summaryrefslogtreecommitdiffstats
path: root/routers/org
diff options
context:
space:
mode:
Diffstat (limited to 'routers/org')
-rw-r--r--routers/org/teams.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go
index 24612459a4..36a2847355 100644
--- a/routers/org/teams.go
+++ b/routers/org/teams.go
@@ -155,6 +155,10 @@ func TeamsRepoAction(ctx *context.Context) {
err = ctx.Org.Team.AddRepository(repo)
case "remove":
err = ctx.Org.Team.RemoveRepository(com.StrTo(ctx.Query("repoid")).MustInt64())
+ case "addall":
+ err = ctx.Org.Team.AddAllRepositories()
+ case "removeall":
+ err = ctx.Org.Team.RemoveAllRepositories()
}
if err != nil {
@@ -162,6 +166,10 @@ func TeamsRepoAction(ctx *context.Context) {
ctx.ServerError("TeamsRepoAction", err)
return
}
+
+ ctx.JSON(200, map[string]interface{}{
+ "redirect": ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories",
+ })
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories")
}