summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-30 02:08:38 -0700
committerUnknwon <u@gogs.io>2016-08-30 02:08:38 -0700
commit780cc2d11093e048e41f2d6da9d76f6c6ac4a5e2 (patch)
tree1657d9fecdcf70d4e0067724344f531d608efb71 /routers/user
parent2a13f682e0fa039a610e7817495d87685f9632f2 (diff)
downloadgitea-780cc2d11093e048e41f2d6da9d76f6c6ac4a5e2.tar.gz
gitea-780cc2d11093e048e41f2d6da9d76f6c6ac4a5e2.zip
router/repo: code refactoring
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go
index c5441f3543..10e8fd02b6 100644
--- a/routers/user/setting.go
+++ b/routers/user/setting.go
@@ -121,7 +121,7 @@ func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *mo
if err != nil {
return fmt.Errorf("ioutil.ReadAll: %v", err)
}
- if _, ok := base.IsImageFile(data); !ok {
+ if !base.IsImageFile(data) {
return errors.New(ctx.Tr("settings.uploaded_avatar_not_a_image"))
}
if err = ctxUser.UploadAvatar(data); err != nil {