moved subscriptions and licences requests to subpages & renaming

This commit is contained in:
Alex
2024-10-10 21:54:09 +02:00
parent d54f2ae2e6
commit fcfc8ad1e0
11 changed files with 99 additions and 148 deletions

View File

@@ -25,7 +25,6 @@ export async function handle({ event, resolve }) {
event.cookies.delete("jwt", { path: "/" });
return await resolve(event);
}
// find the user based on the jwt
const data = await response.json();
@@ -62,13 +61,13 @@ export async function handle({ event, resolve }) {
event.locals.user.membership.end_date.split("T")[0];
}
}
if (event.locals.user.drivers_licence?.issued_date) {
event.locals.user.drivers_licence.issued_date =
event.locals.user.drivers_licence.issued_date.split("T")[0];
if (event.locals.user.licence?.issued_date) {
event.locals.user.licence.issued_date =
event.locals.user.licence.issued_date.split("T")[0];
}
if (event.locals.user.drivers_licence?.expiration_date) {
event.locals.user.drivers_licence.expiration_date =
event.locals.user.drivers_licence.expiration_date.split("T")[0];
if (event.locals.user.licence?.expiration_date) {
event.locals.user.licence.expiration_date =
event.locals.user.licence.expiration_date.split("T")[0];
}
if (
event.locals.user.bank_account &&