UPDATE: Change auth logic
All checks were successful
Build and Release / release (push) Successful in 1m27s

This commit is contained in:
2026-04-09 09:32:34 +07:00
parent a7400f832e
commit 7559667ce2
20 changed files with 448 additions and 20 deletions

View File

@@ -452,6 +452,49 @@ const docTemplate = `{
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete multiple media files by IDs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Media"
],
"summary": "Delete media",
"parameters": [
{
"description": "Media IDs to delete",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_request.MediaBulkDeleteDto"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/media/presigned": {
@@ -1460,6 +1503,20 @@ const docTemplate = `{
}
}
},
"history-api_internal_dtos_request.MediaBulkDeleteDto": {
"type": "object",
"required": [
"media_ids"
],
"properties": {
"media_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"history-api_internal_dtos_request.SignInDto": {
"type": "object",
"required": [

View File

@@ -445,6 +445,49 @@
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete multiple media files by IDs",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Media"
],
"summary": "Delete media",
"parameters": [
{
"description": "Media IDs to delete",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_request.MediaBulkDeleteDto"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/media/presigned": {
@@ -1453,6 +1496,20 @@
}
}
},
"history-api_internal_dtos_request.MediaBulkDeleteDto": {
"type": "object",
"required": [
"media_ids"
],
"properties": {
"media_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"history-api_internal_dtos_request.SignInDto": {
"type": "object",
"required": [

View File

@@ -60,6 +60,15 @@ definitions:
- new_password
- token_id
type: object
history-api_internal_dtos_request.MediaBulkDeleteDto:
properties:
media_ids:
items:
type: string
type: array
required:
- media_ids
type: object
history-api_internal_dtos_request.SignInDto:
properties:
email:
@@ -443,6 +452,33 @@ paths:
tags:
- Auth
/media:
delete:
consumes:
- application/json
description: Delete multiple media files by IDs
parameters:
- description: Media IDs to delete
in: body
name: body
required: true
schema:
$ref: '#/definitions/history-api_internal_dtos_request.MediaBulkDeleteDto'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
security:
- BearerAuth: []
summary: Delete media
tags:
- Media
get:
consumes:
- application/json