summaryrefslogtreecommitdiffstats
path: root/app/team.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-02 11:46:42 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-02-02 11:46:42 -0500
commit365514174ef00dcf426b2b5704c3d7adebe926e1 (patch)
tree41f5544aed1b822ae4e476c9ede496ce740d5048 /app/team.go
parent60be5c902fe30c978d5b30f265509dc28c451407 (diff)
downloadchat-365514174ef00dcf426b2b5704c3d7adebe926e1.tar.gz
chat-365514174ef00dcf426b2b5704c3d7adebe926e1.tar.bz2
chat-365514174ef00dcf426b2b5704c3d7adebe926e1.zip
Add tear down to APIv4 tests (#5250)
* Add tear down to APIv4 tests * Defer tear downs
Diffstat (limited to 'app/team.go')
-rw-r--r--app/team.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/team.go b/app/team.go
index 6225f3ee0..c1560d45a 100644
--- a/app/team.go
+++ b/app/team.go
@@ -539,8 +539,13 @@ func PermanentDeleteTeam(team *model.Team) *model.AppError {
return result.Err
}
- if result := <-Srv.Store.Channel().PermanentDeleteByTeam(team.Id); result.Err != nil {
+ if result := <-Srv.Store.Channel().GetTeamChannels(team.Id); result.Err != nil {
return result.Err
+ } else {
+ channels := result.Data.(*model.ChannelList)
+ for _, c := range *channels {
+ PermanentDeleteChannel(c)
+ }
}
if result := <-Srv.Store.Team().RemoveAllMembersByTeam(team.Id); result.Err != nil {