Lib: Update team database schema (add logo, color)

This commit is contained in:
2024-12-18 14:58:28 +01:00
parent c954b0f3b0
commit 49112280de
4 changed files with 49 additions and 24 deletions

View File

@ -27,13 +27,13 @@ export const handle: Handle = async ({ event, resolve }) => {
event.locals.pb.authStore.model.avatar,
);
} else {
// Fill in the driver_template URL if no avatar chosen
const driver_template: Graphic = await event.locals.pb
// Fill in the driver_headshot_template URL if no avatar chosen
const driver_headshot_template: Graphic = await event.locals.pb
.collection("graphics")
.getFirstListItem('name="driver_template"');
.getFirstListItem('name="driver_headshot_template"');
event.locals.user.avatar_url = event.locals.pb.files.getURL(
driver_template,
driver_template.file,
driver_headshot_template,
driver_headshot_template.file,
);
}