This commit is contained in:
@@ -7,13 +7,13 @@ import (
|
||||
"encoding/base64"
|
||||
"net/http"
|
||||
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
"code.gitea.io/gitea/services/context"
|
||||
user_service "code.gitea.io/gitea/services/user"
|
||||
api "gitea.dev/modules/structs"
|
||||
"gitea.dev/modules/web"
|
||||
"gitea.dev/services/context"
|
||||
user_service "gitea.dev/services/user"
|
||||
)
|
||||
|
||||
// UpdateAvatar updates the Avatar of an User
|
||||
// UpdateAvatar updates the Avatar of a User
|
||||
func UpdateAvatar(ctx *context.APIContext) {
|
||||
// swagger:operation POST /user/avatar user userUpdateAvatar
|
||||
// ---
|
||||
@@ -32,7 +32,7 @@ func UpdateAvatar(ctx *context.APIContext) {
|
||||
|
||||
content, err := base64.StdEncoding.DecodeString(form.Image)
|
||||
if err != nil {
|
||||
ctx.APIError(http.StatusBadRequest, err)
|
||||
ctx.APIError(http.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func UpdateAvatar(ctx *context.APIContext) {
|
||||
ctx.Status(http.StatusNoContent)
|
||||
}
|
||||
|
||||
// DeleteAvatar deletes the Avatar of an User
|
||||
// DeleteAvatar deletes the Avatar of a User
|
||||
func DeleteAvatar(ctx *context.APIContext) {
|
||||
// swagger:operation DELETE /user/avatar user userDeleteAvatar
|
||||
// ---
|
||||
|
||||
Reference in New Issue
Block a user