mirror of
https://github.com/go-gitea/gitea
synced 2024-11-19 00:11:24 +01:00
Only return JSON for add/remove all (#9028)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
9feab29405
commit
f4bdcd6e2b
1 changed files with 8 additions and 4 deletions
|
@ -138,7 +138,8 @@ func TeamsRepoAction(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
switch ctx.Params(":action") {
|
action := ctx.Params(":action")
|
||||||
|
switch action {
|
||||||
case "add":
|
case "add":
|
||||||
repoName := path.Base(ctx.Query("repo_name"))
|
repoName := path.Base(ctx.Query("repo_name"))
|
||||||
var repo *models.Repository
|
var repo *models.Repository
|
||||||
|
@ -167,9 +168,12 @@ func TeamsRepoAction(ctx *context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if action == "addall" || action == "removeall" {
|
||||||
ctx.JSON(200, map[string]interface{}{
|
ctx.JSON(200, map[string]interface{}{
|
||||||
"redirect": ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories",
|
"redirect": ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories",
|
||||||
})
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories")
|
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue