[APIV4] POST /commands/{command_id}/regen_token for apiV4 (#6052)
* implement POST /commands/{command_id}/regen_token for apiV4
* update comment
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
461a0b3b7c
Коммит
d8d0716122
@@ -2243,6 +2243,16 @@ func (c *Client4) ListAutocompleteCommands(teamId string) ([]*Command, *Response
|
||||
}
|
||||
}
|
||||
|
||||
// RegenCommandToken will create a new token if the user have the right permissions.
|
||||
func (c *Client4) RegenCommandToken(commandId string) (string, *Response) {
|
||||
if r, err := c.DoApiPut(c.GetCommandRoute(commandId)+"/regen_token", ""); err != nil {
|
||||
return "", &Response{StatusCode: r.StatusCode, Error: err}
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return MapFromJson(r.Body)["token"], BuildResponse(r)
|
||||
}
|
||||
}
|
||||
|
||||
// Status Section
|
||||
|
||||
// GetUserStatus returns a user based on the provided user id string.
|
||||
|
||||
Ссылка в новой задаче
Block a user