Add appeal and login functionality structure
Introduces initial structure for appeal and login forms in both the frontend and backend. New controllers, APIs, and components were created, but functionality has not been fully implemented yet. This serves as a foundation for future development of these features.
This commit is contained in:
@@ -36,3 +36,7 @@ paths:
|
||||
$ref: './schemas/forms/appeal/appeal.yml#/MinecraftAppeal'
|
||||
/appeal/discord-appeal:
|
||||
$ref: './schemas/forms/appeal/appeal.yml#/DiscordAppeal'
|
||||
/login/addUserLogin:
|
||||
$ref: './schemas/login/login.yml#/AddUserLogin'
|
||||
/login/userLogin:
|
||||
$ref: './schemas/login/login.yml#/UserLogin'
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
UserLogin:
|
||||
post:
|
||||
tags:
|
||||
- login
|
||||
summary: Log in to the site
|
||||
description: Log in to the site through a code from the server
|
||||
operationId: login
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LoginData'
|
||||
responses:
|
||||
'200':
|
||||
description: Logged in
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LoginResult'
|
||||
'401':
|
||||
description: Login failed - Invalid credentials
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../generic/errors.yml#/components/schemas/ApiError'
|
||||
default:
|
||||
description: Unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../generic/errors.yml#/components/schemas/ApiError'
|
||||
AddUserLogin:
|
||||
post:
|
||||
tags:
|
||||
- login
|
||||
summary: Add a login
|
||||
description: Add a code, user combination that can be used to log in
|
||||
operationId: addLogin
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AddLogin'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
default:
|
||||
description: Unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '../generic/errors.yml#/components/schemas/ApiError'
|
||||
components:
|
||||
schemas:
|
||||
LoginData:
|
||||
type: object
|
||||
required:
|
||||
- loginCode
|
||||
properties:
|
||||
loginCode:
|
||||
type: string
|
||||
description: The code to log in
|
||||
LoginResult:
|
||||
type: object
|
||||
required:
|
||||
- uuid
|
||||
- userName
|
||||
- auth
|
||||
properties:
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID of logged in user
|
||||
userName:
|
||||
type: string
|
||||
description: Name of the logged in user
|
||||
auth:
|
||||
type: string
|
||||
description: Token to use along side requests
|
||||
AddLogin:
|
||||
type: object
|
||||
required:
|
||||
- loginCode
|
||||
- uuid
|
||||
properties:
|
||||
auth:
|
||||
type: string
|
||||
description: Token to verify the sender is allowed to add logins
|
||||
loginCode:
|
||||
type: string
|
||||
description: The code that can be logged in with
|
||||
uuid:
|
||||
type: string
|
||||
format: uuid
|
||||
description: UUID of the user that will get logged in
|
||||
Reference in New Issue
Block a user