diff --git a/frontend/src/routes/auth/+page.server.ts b/frontend/src/routes/auth/+page.server.ts index 41b3afd..ab3794e 100644 --- a/frontend/src/routes/auth/+page.server.ts +++ b/frontend/src/routes/auth/+page.server.ts @@ -28,7 +28,7 @@ export const actions = { cookies.set('sessionjwt', data.jwt); cookies.set('userid', data.user.id); - return { success: true }; + return { success: true, id: data.user.id }; } catch (err) { console.log(err); return fail(500, { message: 'Failed to login!' }); @@ -58,7 +58,7 @@ export const actions = { cookies.set('sessionjwt', data.jwt); cookies.set('userid', data.user.id); - return { success: true }; + return { success: true, id: data.user.id }; } catch (err) { console.log(err); return fail(500, { message: 'Failed to register!' }); diff --git a/frontend/src/routes/auth/+page.svelte b/frontend/src/routes/auth/+page.svelte index cfff478..db61076 100644 --- a/frontend/src/routes/auth/+page.svelte +++ b/frontend/src/routes/auth/+page.svelte @@ -1,7 +1,11 @@