🐛 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:
|
if imported is None:
|
||||||
quizzes = await Quiz.objects.all(user_id=user_id, public=True)
|
quizzes = await Quiz.objects.all(user_id=user_id, public=True)
|
||||||
else:
|
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:
|
if len(quizzes) == 0:
|
||||||
raise HTTPException(status_code=404, detail="no quizzes found")
|
raise HTTPException(status_code=404, detail="no quizzes found")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
event.locals.email = await res.text();
|
event.locals.email = await res.text();
|
||||||
const resp = await resolve(event);
|
const resp = await resolve(event);
|
||||||
console.log(res.headers.get('set-cookie'));
|
|
||||||
try {
|
try {
|
||||||
resp.headers.set('Set-Cookie', res.headers.get('set-cookie'));
|
resp.headers.set('Set-Cookie', res.headers.get('set-cookie'));
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
document.body.addEventListener('keydown', close_start_game_if_esc_is_pressed);
|
document.body.addEventListener('keydown', close_start_game_if_esc_is_pressed);
|
||||||
});
|
});
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
console.log(data, 'data');
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|||||||
Reference in New Issue
Block a user