Skip to content

Commit b7bf9df

Browse files
committed
more
1 parent aadd7dc commit b7bf9df

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

modules/auth/user_form.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors)
101101
}
102102

103103
const (
104-
AVATAR_LOCAL string = "local"
105-
AVATAR_BYMAIL string = "bymail"
104+
AvatarLocal string = "local"
105+
AvatarByMail string = "bymail"
106106
)
107107

108108
type AvatarForm struct {

routers/org/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func SettingsPost(ctx *context.Context, form auth.UpdateOrgSettingForm) {
8484
}
8585

8686
func SettingsAvatar(ctx *context.Context, form auth.AvatarForm) {
87-
form.Source = auth.AVATAR_LOCAL
87+
form.Source = auth.AvatarLocal
8888
if err := user.UpdateAvatarSetting(ctx, form, ctx.Org.Organization); err != nil {
8989
ctx.Flash.Error(err.Error())
9090
} else {

routers/user/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func SettingsPost(ctx *context.Context, form auth.UpdateProfileForm) {
104104

105105
// FIXME: limit size.
106106
func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *models.User) error {
107-
ctxUser.UseCustomAvatar = form.Source == auth.AVATAR_LOCAL
107+
ctxUser.UseCustomAvatar = form.Source == auth.AvatarLocal
108108
if len(form.Gravatar) > 0 {
109109
ctxUser.Avatar = base.EncodeMD5(form.Gravatar)
110110
ctxUser.AvatarEmail = form.Gravatar

0 commit comments

Comments
 (0)