Implement GET /users/email/{email} endpoint for APIv4 (#5309)

* added get user by email endpoint for APIv4

* added get user by email endpoint unit test and driver

* removed the appended return of user ids on logout

* Added RequireEmail to validate user email. Also updated the get user by email endpoint and unit test
Этот коммит содержится в:
Ruzette Tanyag
2017-02-07 11:54:07 -05:00
коммит произвёл Christopher Speller
родитель 5cc30fa061
Коммит d91fea6518
6 изменённых файлов: 134 добавлений и 4 удалений

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

@@ -25,6 +25,7 @@ type ApiParams struct {
CommandId string
HookId string
EmojiId string
Email string
Page int
PerPage int
}
@@ -66,6 +67,10 @@ func ApiParamsFromRequest(r *http.Request) *ApiParams {
params.EmojiId = val
}
if val, ok := props["email"]; ok {
params.Email = val
}
if val, err := strconv.Atoi(r.URL.Query().Get("page")); err != nil {
params.Page = PAGE_DEFAULT
} else {