Verified Commit d7a91e06 authored by Jonas-Ian Kuche's avatar Jonas-Ian Kuche
Browse files

Add super user routes


Signed-off-by: Jonas-Ian Kuche's avatarJonas-Ian Kuche <jonas-ian.kuche@mni.thm.de>
parent 0f275882
......@@ -23,6 +23,8 @@ tags:
description: User
- name: chart
description: Chart
- name: SuperUser
description: Super User
paths:
/api/quizzes:
get:
......@@ -1525,6 +1527,107 @@ paths:
format: binary
'500':
$ref: '#/components/responses/InternalServerError'
/api/su/courses:
get:
operationId: suCourses
summary: Lists all courses
tags:
- SuperUser
security:
- userBearer: []
responses:
'200':
description: The courses
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Courses'
/api/su/quizzes:
get:
operationId: suQuizzes
summary: Lists all Quizzes
tags:
- SuperUser
security:
- userBearer: []
responses:
'200':
description: The quizzes
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Quizzes'
/api/su/sessions:
get:
operationId: suSessions
summary: Lists all Sessions
tags:
- SuperUser
security:
- userBearer: []
responses:
'200':
description: The sessions
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Session'
/api/su/users:
get:
operationId: suUsers
summary: Lists all Users
tags:
- SuperUser
security:
- userBearer: []
responses:
'200':
description: The users
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
/api/su/docent:
get:
operationId: suMakeDocent
summary: Makes a User docent
tags:
- SuperUser
security:
- userBearer: []
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
example: 'username'
required: [username]
responses:
'200':
description: The added docent
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
components:
schemas:
Quiz:
......@@ -2008,6 +2111,9 @@ components:
docent:
type: boolean
example: false
superUser:
type: boolean
example: false
MyStatistics:
type: object
properties:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment