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
@@ -358,3 +358,16 @@ func (c *Context) RequireChannelId() *Context {
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Context) RequireEmail() *Context {
|
||||
if c.Err != nil {
|
||||
return c
|
||||
}
|
||||
|
||||
pos := strings.Index(c.Params.Email, "@")
|
||||
if pos < 0 {
|
||||
c.SetInvalidUrlParam("email")
|
||||
}
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user