Clean code

This commit is contained in:
Unknown
2014-06-27 23:14:33 -04:00
parent 57ac15aa20
commit ee9b7f322f
3 changed files with 5 additions and 8 deletions

View File

@ -68,7 +68,7 @@ func SettingPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
ctx.User.Avatar = base.EncodeMd5(form.Avatar)
ctx.User.AvatarEmail = form.Avatar
if err := models.UpdateUser(ctx.User); err != nil {
ctx.Handle(500, "setting.Setting", err)
ctx.Handle(500, "setting.Setting(UpdateUser)", err)
return
}
log.Trace("%s User setting updated: %s", ctx.Req.RequestURI, ctx.User.LowerName)

View File

@ -296,7 +296,7 @@ func DeletePost(ctx *middleware.Context) {
case models.ErrUserOwnRepos:
ctx.Flash.Error("Your account still have ownership of repository, you have to delete or transfer them first.")
default:
ctx.Handle(500, "user.Delete", err)
ctx.Handle(500, "user.Delete(DeleteUser)", err)
return
}
} else {