Implement DELETE /users/{user_id endpoint for APIv4 - rebase cleanup (#5307)
* added delete user endpoint * added unit test for delete user endpoint * added delete user driver
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
aa75f981e1
Коммит
fc43bf0581
@@ -285,6 +285,16 @@ func (c *Client4) UpdateUserRoles(userId, roles string) (bool, *Response) {
|
||||
}
|
||||
}
|
||||
|
||||
// DeleteUser deactivates a user in the system based on the provided user id string.
|
||||
func (c *Client4) DeleteUser(userId string) (bool, *Response) {
|
||||
if r, err := c.DoApiDelete(c.GetUserRoute(userId), ""); 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.
|
||||
|
||||
Ссылка в новой задаче
Block a user