add: Subscriptions receival

This commit is contained in:
Alex
2024-09-29 21:26:48 +02:00
parent 8e9eb22cb0
commit f7c1ad2b8e
3 changed files with 6 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ export async function handle({ event, resolve }) {
}
// find the user based on the jwt
const userData = await response.json();
const data = await response.json();
// Check if the server sent a new token
const newToken = response.headers.get("Set-Cookie");
@@ -44,7 +44,8 @@ export async function handle({ event, resolve }) {
}
}
event.locals.user = userData;
event.locals.subscriptions = data.subscriptions;
event.locals.user = data.user;
if (event.locals.user.date_of_birth) {
event.locals.user.date_of_birth =
event.locals.user.date_of_birth.split("T")[0];