mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 07:17:14 -04:00
Improve Swagger documentation for user endpoints
This commit is contained in:
parent
1316f4d338
commit
b074e08f34
23 changed files with 703 additions and 2 deletions
|
@ -28,6 +28,10 @@ func UpdateAvatar(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
form := web.GetForm(ctx).(*api.UpdateUserAvatarOption)
|
||||
|
||||
content, err := base64.StdEncoding.DecodeString(form.Image)
|
||||
|
@ -55,6 +59,10 @@ func DeleteAvatar(ctx *context.APIContext) {
|
|||
// responses:
|
||||
// "204":
|
||||
// "$ref": "#/responses/empty"
|
||||
// "401":
|
||||
// "$ref": "#/responses/unauthorized"
|
||||
// "403":
|
||||
// "$ref": "#/responses/forbidden"
|
||||
err := user_service.DeleteAvatar(ctx, ctx.Doer)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "DeleteAvatar", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue