mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
router/repo: code refactoring
This commit is contained in:
parent
2a13f682e0
commit
780cc2d110
13 changed files with 253 additions and 261 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue