File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ func TeamsRepoAction(ctx *context.Context) {
138
138
}
139
139
140
140
var err error
141
- switch ctx .Params (":action" ) {
141
+ action := ctx .Params (":action" )
142
+ switch action {
142
143
case "add" :
143
144
repoName := path .Base (ctx .Query ("repo_name" ))
144
145
var repo * models.Repository
@@ -167,9 +168,12 @@ func TeamsRepoAction(ctx *context.Context) {
167
168
return
168
169
}
169
170
170
- ctx .JSON (200 , map [string ]interface {}{
171
- "redirect" : ctx .Org .OrgLink + "/teams/" + ctx .Org .Team .LowerName + "/repositories" ,
172
- })
171
+ if action == "addall" || action == "removeall" {
172
+ ctx .JSON (200 , map [string ]interface {}{
173
+ "redirect" : ctx .Org .OrgLink + "/teams/" + ctx .Org .Team .LowerName + "/repositories" ,
174
+ })
175
+ return
176
+ }
173
177
ctx .Redirect (ctx .Org .OrgLink + "/teams/" + ctx .Org .Team .LowerName + "/repositories" )
174
178
}
175
179
You can’t perform that action at this time.
0 commit comments