✨ Added info if quiz on kahoot is private
This commit is contained in:
@@ -171,11 +171,14 @@ async def get_quiz_list(user: User = Depends(get_current_user), page_size: int |
|
||||
async def import_quiz_route(quiz_id: str, user: User = Depends(get_current_user)):
|
||||
if user.storage_used > settings.free_storage_limit:
|
||||
raise HTTPException(status_code=409, detail="Storage limit reached")
|
||||
resp_data = await import_quiz(quiz_id, user)
|
||||
try:
|
||||
return await import_quiz(quiz_id, user)
|
||||
except ValidationError as e:
|
||||
print(e)
|
||||
raise HTTPException(status_code=400, detail="This quiz isn't (yet) supported")
|
||||
if type(resp_data) is int:
|
||||
raise HTTPException(status_code=resp_data, detail="kahoot")
|
||||
else:
|
||||
return resp_data
|
||||
except ValidationError:
|
||||
raise HTTPException(400, detail="unsupported")
|
||||
|
||||
|
||||
@router.delete("/delete/{quiz_id}")
|
||||
|
||||
Reference in New Issue
Block a user