Add event join service and api endpoint
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user