🐛 Fixed old quizzes not showing up on user-screen
This commit is contained in:
@@ -27,7 +27,9 @@ async def get_quizzes_from_user(user_id: UUID, imported: bool | None = None):
|
||||
if imported is None:
|
||||
quizzes = await Quiz.objects.all(user_id=user_id, public=True)
|
||||
else:
|
||||
quizzes = await Quiz.objects.all(user_id=user_id, public=True, imported_from_kahoot=imported)
|
||||
quizzes = await Quiz.objects.filter(
|
||||
(Quiz.imported_from_kahoot == False) | (Quiz.imported_from_kahoot == None) # noqa
|
||||
).all(user_id=user_id, public=True)
|
||||
if len(quizzes) == 0:
|
||||
raise HTTPException(status_code=404, detail="no quizzes found")
|
||||
else:
|
||||
|
||||
@@ -27,7 +27,6 @@ export const handle: Handle = async ({ event, resolve }) => {
|
||||
if (res.ok) {
|
||||
event.locals.email = await res.text();
|
||||
const resp = await resolve(event);
|
||||
console.log(res.headers.get('set-cookie'));
|
||||
try {
|
||||
resp.headers.set('Set-Cookie', res.headers.get('set-cookie'));
|
||||
} catch {
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
document.body.addEventListener('keydown', close_start_game_if_esc_is_pressed);
|
||||
});
|
||||
export let data: PageData;
|
||||
console.log(data, 'data');
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user