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
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
5cc30fa061
Коммит
d91fea6518
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user