|
|
@ -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 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ctx.JSON(200, map[string]interface{}{ |
|
|
|
if action == "addall" || action == "removeall" { |
|
|
|
"redirect": ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories", |
|
|
|
ctx.JSON(200, map[string]interface{}{ |
|
|
|
}) |
|
|
|
"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") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|