add implementation for verify email for apiv4 (#5502)

Этот коммит содержится в:
Carlos Tadeu Panato Junior
2017-02-24 14:27:47 +01:00
коммит произвёл Joram Wilander
родитель ace228c4e5
Коммит 7fc5dc236a
4 изменённых файлов: 73 добавлений и 0 удалений

Просмотреть файл

@@ -479,6 +479,17 @@ func (c *Client4) GetAudits(userId string, page int, perPage int, etag string) (
}
}
// Verify user email user id and hash strings.
func (c *Client4) VerifyUserEmail(userId, hashId string) (bool, *Response) {
requestBody := map[string]string{"uid": userId, "hid": hashId}
if r, err := c.DoApiPost(c.GetUserRoute(userId)+"/email/verify", MapToJson(requestBody)); err != nil {
return false, &Response{StatusCode: r.StatusCode, Error: err}
} else {
defer closeBody(r)
return CheckStatusOK(r), BuildResponse(r)
}
}
// Team Section
// CreateTeam creates a team in the system based on the provided team struct.