Fix bug on avatar (#31008)
Co-authored-by: silverwind <me@silverwind.io> (cherry picked from commit 58a03e9fadb345de5653345c2a68ecfd0750940a)
This commit is contained in:
parent
99f29e59a1
commit
1be797faba
3 changed files with 25 additions and 11 deletions
|
@ -46,6 +46,7 @@ func UpdateAvatar(ctx *context.APIContext) {
|
|||
err = user_service.UploadAvatar(ctx, ctx.Org.Organization.AsUser(), content)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "UploadAvatar", err)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Status(http.StatusNoContent)
|
||||
|
@ -72,6 +73,7 @@ func DeleteAvatar(ctx *context.APIContext) {
|
|||
err := user_service.DeleteAvatar(ctx, ctx.Org.Organization.AsUser())
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "DeleteAvatar", err)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Status(http.StatusNoContent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue