fix: change avatar upload response to JSON object with URL;
feat: add UrlDto for standardized URL responses; refactor: update avatar upload endpoint to return UrlDto; docs: regenerate Swagger; chore: add comments for untested profile controller methods
This commit is contained in:
@@ -343,7 +343,7 @@ const docTemplate = `{
|
||||
"multipart/form-data"
|
||||
],
|
||||
"produces": [
|
||||
"text/plain"
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Profile"
|
||||
@@ -362,7 +362,7 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "Uploaded image url",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/dto.UrlDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -550,6 +550,17 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UrlDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChangePasswordRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
"multipart/form-data"
|
||||
],
|
||||
"produces": [
|
||||
"text/plain"
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Profile"
|
||||
@@ -358,7 +358,7 @@
|
||||
"200": {
|
||||
"description": "Uploaded image url",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/dto.UrlDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -546,6 +546,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UrlDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ChangePasswordRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
@@ -34,6 +34,13 @@ definitions:
|
||||
hide_profile_details:
|
||||
type: boolean
|
||||
type: object
|
||||
dto.UrlDto:
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
required:
|
||||
- url
|
||||
type: object
|
||||
models.ChangePasswordRequest:
|
||||
properties:
|
||||
old_password:
|
||||
@@ -394,12 +401,12 @@ paths:
|
||||
required: true
|
||||
type: file
|
||||
produces:
|
||||
- text/plain
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Uploaded image url
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/dto.UrlDto'
|
||||
security:
|
||||
- JWT: []
|
||||
summary: Upload an avatar
|
||||
|
||||
Reference in New Issue
Block a user