Add event join service and api endpoint
All checks were successful
Backend Check Build (NixCN CMS) TeamCity build finished
Client CMS Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-31 11:58:56 +08:00
parent 82c476fa80
commit 1504954be4
6 changed files with 485 additions and 1 deletions

View File

@@ -100,6 +100,17 @@ definitions:
checkin_code:
type: string
type: object
service_event.EventJoinData:
properties:
event_id:
type: string
role:
type: string
state:
type: string
user_id:
type: string
type: object
service_user.UserInfoData:
properties:
allow_public:
@@ -636,6 +647,63 @@ paths:
summary: Get Event Information
tags:
- Event
/event/join:
post:
consumes:
- application/json
description: Allows an authenticated user to join an event by providing the
event ID. The user's role and state are initialized by the service.
parameters:
- description: Event Join Details (UserId and EventId are required)
in: body
name: request
required: true
schema:
$ref: '#/definitions/service_event.EventJoinData'
produces:
- application/json
responses:
"200":
description: Successfully joined the event
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"400":
description: Invalid Input or UUID Parse Failed
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"403":
description: Unauthorized / Missing User ID
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
"500":
description: Internal Server Error / Database Error
schema:
allOf:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
type: object
type: object
security:
- ApiKeyAuth: []
summary: Join an Event
tags:
- Event
/event/list:
get:
consumes: