GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

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

Add share quiz routes


Signed-off-by: Jonas-Ian Kuche's avatarJonas-Ian Kuche <jonas-ian.kuche@mni.thm.de>
parent 084451cf
......@@ -213,6 +213,63 @@ paths:
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/quizzes/{quizID}/share:
post:
operationId: shareQuiz
summary: Shares a Quiz
tags:
- quiz
security:
- userBearer: []
parameters:
- $ref: '#/components/parameters/QuizID'
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
example: 'username'
required: [username]
responses:
'200':
$ref: '#/components/responses/Ok'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/quizzes/{quizID}/share/{username}:
post:
operationId: unShareQuiz
summary: Unshares a Quiz
tags:
- quiz
security:
- userBearer: []
parameters:
- $ref: '#/components/parameters/QuizID'
- name: username
in: path
required: true
schema:
type: string
responses:
'200':
$ref: '#/components/responses/Ok'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/quizzes/{quizID}/questions:
get:
operationId: listQuizQuestions
......@@ -1472,6 +1529,27 @@ paths:
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
/api/users/me/sharedWithMe:
get:
operationId: sharedWithMe
summary: Gets quizzes shared with me
tags:
- user
security:
- userBearer: []
responses:
'200':
description: The quizzes
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Quiz'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
/api/charts/session/{sessionID}:
get:
operationId: getChartForSession
......
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