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
@@ -690,6 +690,15 @@ func GetTeamsUnreadForUser(excludeTeamId string, userId string) ([]*model.TeamUn
|
||||
}
|
||||
}
|
||||
|
||||
func PermanentDeleteTeamId(teamId string) *model.AppError {
|
||||
team, err := GetTeam(teamId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return PermanentDeleteTeam(team)
|
||||
}
|
||||
|
||||
func PermanentDeleteTeam(team *model.Team) *model.AppError {
|
||||
team.DeleteAt = model.GetMillis()
|
||||
if result := <-Srv.Store.Team().Update(team); result.Err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user