feat: AddUserTitle implemented
All checks were successful
Build and Deploy Go App / build (push) Successful in 5m23s
Build and Deploy Go App / deploy (push) Successful in 28s

This commit is contained in:
Iron_Felix 2025-11-24 09:34:05 +03:00
parent 15a681c622
commit 76df4d8592
10 changed files with 749 additions and 39 deletions

View file

@ -87,3 +87,55 @@ get:
description: Request params are not correct
'500':
description: Unknown server error
post:
summary: Add a title to a user
description: User adding title to list af watched, status required
operationId: addUserTitle
parameters:
- name: user_id
in: path
required: true
schema:
type: integer
format: int64
description: ID of the user to assign the title to
example: 123
requestBody:
required: true
content:
application/json:
schema:
$ref: '../schemas/UserTitle.yaml'
responses:
'200':
description: Title successfully added to user
content:
application/json:
schema:
type: object
properties:
# success:
# type: boolean
# example: true
# error:
# type: string
# nullable: true
# example: null
data:
$ref: '../schemas/UserTitleMini.yaml'
# required:
# - success
# - error
'400':
description: Invalid request body (missing fields, invalid types, etc.)
'401':
description: Unauthorized — missing or invalid auth token
'403':
description: Forbidden — user not allowed to assign titles to this user
'404':
description: User or Title not found
'409':
description: Conflict — title already assigned to user (if applicable)
'500':
description: Internal server error