[MM-13671] Rework Team InviteId Creation and Updates (#10536)
* Add regenerate invite ID endpoint; Dont allow inviteID updates via other methods; Remove unrequired checks in get handler * Fix tests; Dont accept TeamId as invite ID * Ensure all teams have an InviteID set * Custom Selector to get empty teams; dont crash when inviteid set fails * Remote InviteId from TeamPatch * Add missing translation * Translation string order * Use sync store * gofmt
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ec95793b90
Коммит
f7982216e4
@@ -1577,6 +1577,16 @@ func (c *Client4) PatchTeam(teamId string, patch *TeamPatch) (*Team, *Response)
|
||||
return TeamFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
|
||||
// RegenerateTeamInviteId requests a new invite ID to be generated.
|
||||
func (c *Client4) RegenerateTeamInviteId(teamId string) (*Team, *Response) {
|
||||
r, err := c.DoApiPost(c.GetTeamRoute(teamId)+"/regenerate_invite_id", "")
|
||||
if err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
}
|
||||
defer closeBody(r)
|
||||
return TeamFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
|
||||
// SoftDeleteTeam deletes the team softly (archive only, not permanent delete).
|
||||
func (c *Client4) SoftDeleteTeam(teamId string) (bool, *Response) {
|
||||
r, err := c.DoApiDelete(c.GetTeamRoute(teamId))
|
||||
|
||||
Ссылка в новой задаче
Block a user