summaryrefslogtreecommitdiffstats
path: root/routers/user/setting_openid.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/setting_openid.go')
-rw-r--r--routers/user/setting_openid.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/user/setting_openid.go b/routers/user/setting_openid.go
index b39278d7c3..92eb636e29 100644
--- a/routers/user/setting_openid.go
+++ b/routers/user/setting_openid.go
@@ -30,7 +30,7 @@ func SettingsOpenID(ctx *context.Context) {
openid, err := models.GetUserOpenIDs(ctx.User.ID)
if err != nil {
- ctx.Handle(500, "GetUserOpenIDs", err)
+ ctx.ServerError("GetUserOpenIDs", err)
return
}
ctx.Data["OpenIDs"] = openid
@@ -46,7 +46,7 @@ func SettingsOpenIDPost(ctx *context.Context, form auth.AddOpenIDForm) {
if ctx.HasError() {
openid, err := models.GetUserOpenIDs(ctx.User.ID)
if err != nil {
- ctx.Handle(500, "GetUserOpenIDs", err)
+ ctx.ServerError("GetUserOpenIDs", err)
return
}
ctx.Data["OpenIDs"] = openid
@@ -70,7 +70,7 @@ func SettingsOpenIDPost(ctx *context.Context, form auth.AddOpenIDForm) {
oids, err := models.GetUserOpenIDs(ctx.User.ID)
if err != nil {
- ctx.Handle(500, "GetUserOpenIDs", err)
+ ctx.ServerError("GetUserOpenIDs", err)
return
}
ctx.Data["OpenIDs"] = oids
@@ -100,7 +100,7 @@ func settingsOpenIDVerify(ctx *context.Context) {
oids, err := models.GetUserOpenIDs(ctx.User.ID)
if err != nil {
- ctx.Handle(500, "GetUserOpenIDs", err)
+ ctx.ServerError("GetUserOpenIDs", err)
return
}
ctx.Data["OpenIDs"] = oids
@@ -121,7 +121,7 @@ func settingsOpenIDVerify(ctx *context.Context) {
ctx.RenderWithErr(ctx.Tr("form.openid_been_used", id), tplSettingsOpenID, &auth.AddOpenIDForm{Openid: id})
return
}
- ctx.Handle(500, "AddUserOpenID", err)
+ ctx.ServerError("AddUserOpenID", err)
return
}
log.Trace("Associated OpenID %s to user %s", id, ctx.User.Name)
@@ -133,7 +133,7 @@ func settingsOpenIDVerify(ctx *context.Context) {
// DeleteOpenID response for delete user's openid
func DeleteOpenID(ctx *context.Context) {
if err := models.DeleteUserOpenID(&models.UserOpenID{ID: ctx.QueryInt64("id"), UID: ctx.User.ID}); err != nil {
- ctx.Handle(500, "DeleteUserOpenID", err)
+ ctx.ServerError("DeleteUserOpenID", err)
return
}
log.Trace("OpenID address deleted: %s", ctx.User.Name)
@@ -147,7 +147,7 @@ func DeleteOpenID(ctx *context.Context) {
// ToggleOpenIDVisibility response for toggle visibility of user's openid
func ToggleOpenIDVisibility(ctx *context.Context) {
if err := models.ToggleUserOpenIDVisibility(ctx.QueryInt64("id")); err != nil {
- ctx.Handle(500, "ToggleUserOpenIDVisibility", err)
+ ctx.ServerError("ToggleUserOpenIDVisibility", err)
return
}