From 7fc5dc236aa2437e81b238f65d39c2f795eac493 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Fri, 24 Feb 2017 14:27:47 +0100 Subject: add implementation for verify email for apiv4 (#5502) --- model/client4.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'model') 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. -- cgit v1.2.3-1-g7c22