diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2017-02-24 14:27:47 +0100 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-02-24 08:27:47 -0500 |
commit | 7fc5dc236aa2437e81b238f65d39c2f795eac493 (patch) | |
tree | 27c84da1c0b63e181810200f0e94d29707487927 /model | |
parent | ace228c4e52bd25dca24d1a5b35eff97740e5ea2 (diff) | |
download | chat-7fc5dc236aa2437e81b238f65d39c2f795eac493.tar.gz chat-7fc5dc236aa2437e81b238f65d39c2f795eac493.tar.bz2 chat-7fc5dc236aa2437e81b238f65d39c2f795eac493.zip |
add implementation for verify email for apiv4 (#5502)
Diffstat (limited to 'model')
-rw-r--r-- | model/client4.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/model/client4.go b/model/client4.go index 6b9a389c9..f51e86a56 100644 --- a/model/client4.go +++ b/model/client4.go @@ -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. |