Add APIv4 endpoint to permanently delete teams (#6604)
Tests are added, however, it only tests the property if its soft deleted. In the background it will be hard deleted, but that is untestable through a integration test.
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
98ac903fce
Коммит
0c04c5334f
@@ -1046,6 +1046,17 @@ func (c *Client4) SoftDeleteTeam(teamId string) (bool, *Response) {
|
||||
}
|
||||
}
|
||||
|
||||
// PermanentDeleteTeam deletes the team, should only be used when needed for
|
||||
// compliance and the like
|
||||
func (c *Client4) PermanentDeleteTeam(teamId string) (bool, *Response) {
|
||||
if r, err := c.DoApiDelete(c.GetTeamRoute(teamId) + "?permanent=true"); err != nil {
|
||||
return false, &Response{StatusCode: r.StatusCode, Error: err}
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return CheckStatusOK(r), BuildResponse(r)
|
||||
}
|
||||
}
|
||||
|
||||
// GetTeamMembers returns team members based on the provided team id string.
|
||||
func (c *Client4) GetTeamMembers(teamId string, page int, perPage int, etag string) ([]*TeamMember, *Response) {
|
||||
query := fmt.Sprintf("?page=%v&per_page=%v", page, perPage)
|
||||
|
||||
Ссылка в новой задаче
Block a user