aboutsummaryrefslogtreecommitdiffstats
path: root/routers/org/teams.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/org/teams.go')
-rw-r--r--routers/org/teams.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go
index 7f8b828e82..d894c86614 100644
--- a/routers/org/teams.go
+++ b/routers/org/teams.go
@@ -37,7 +37,7 @@ func Teams(ctx *context.Context) {
for _, t := range org.Teams {
if err := t.GetMembers(); err != nil {
- ctx.Handle(500, "GetMembers", err)
+ ctx.ServerError("GetMembers", err)
return
}
}
@@ -85,7 +85,7 @@ func TeamsAction(ctx *context.Context) {
ctx.Flash.Error(ctx.Tr("form.user_not_exist"))
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName)
} else {
- ctx.Handle(500, " GetUserByName", err)
+ ctx.ServerError(" GetUserByName", err)
}
return
}
@@ -142,7 +142,7 @@ func TeamsRepoAction(ctx *context.Context) {
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories")
return
}
- ctx.Handle(500, "GetRepositoryByName", err)
+ ctx.ServerError("GetRepositoryByName", err)
return
}
err = ctx.Org.Team.AddRepository(repo)
@@ -152,7 +152,7 @@ func TeamsRepoAction(ctx *context.Context) {
if err != nil {
log.Error(3, "Action(%s): '%s' %v", ctx.Params(":action"), ctx.Org.Team.Name, err)
- ctx.Handle(500, "TeamsRepoAction", err)
+ ctx.ServerError("TeamsRepoAction", err)
return
}
ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories")
@@ -203,7 +203,7 @@ func NewTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
case models.IsErrTeamAlreadyExist(err):
ctx.RenderWithErr(ctx.Tr("form.team_name_been_taken"), tplTeamNew, &form)
default:
- ctx.Handle(500, "NewTeam", err)
+ ctx.ServerError("NewTeam", err)
}
return
}
@@ -216,7 +216,7 @@ func TeamMembers(ctx *context.Context) {
ctx.Data["Title"] = ctx.Org.Team.Name
ctx.Data["PageIsOrgTeams"] = true
if err := ctx.Org.Team.GetMembers(); err != nil {
- ctx.Handle(500, "GetMembers", err)
+ ctx.ServerError("GetMembers", err)
return
}
ctx.HTML(200, tplTeamMembers)
@@ -227,7 +227,7 @@ func TeamRepositories(ctx *context.Context) {
ctx.Data["Title"] = ctx.Org.Team.Name
ctx.Data["PageIsOrgTeams"] = true
if err := ctx.Org.Team.GetRepositories(); err != nil {
- ctx.Handle(500, "GetRepositories", err)
+ ctx.ServerError("GetRepositories", err)
return
}
ctx.HTML(200, tplTeamRepositories)
@@ -285,7 +285,7 @@ func EditTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
case models.IsErrTeamAlreadyExist(err):
ctx.RenderWithErr(ctx.Tr("form.team_name_been_taken"), tplTeamNew, &form)
default:
- ctx.Handle(500, "UpdateTeam", err)
+ ctx.ServerError("UpdateTeam", err)
}
return
}