summaryrefslogtreecommitdiffstats
path: root/store/sql_team_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_team_store.go')
-rw-r--r--store/sql_team_store.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/store/sql_team_store.go b/store/sql_team_store.go
index 1a0aeabde..9578549ca 100644
--- a/store/sql_team_store.go
+++ b/store/sql_team_store.go
@@ -300,3 +300,20 @@ func (s SqlTeamStore) GetAllTeamListing() StoreChannel {
return storeChannel
}
+
+func (s SqlTeamStore) PermanentDelete(teamId string) StoreChannel {
+ storeChannel := make(StoreChannel)
+
+ go func() {
+ result := StoreResult{}
+
+ if _, err := s.GetMaster().Exec("DELETE FROM Teams WHERE Id = :TeamId", map[string]interface{}{"TeamId": teamId}); err != nil {
+ result.Err = model.NewAppError("SqlTeamStore.Delete", "We couldn't delete the existing team", "teamId="+teamId+", "+err.Error())
+ }
+
+ storeChannel <- result
+ close(storeChannel)
+ }()
+
+ return storeChannel
+}