mirror of
https://github.com/KevinMidboe/infra-map.git
synced 2025-10-29 17:40:28 +00:00
13 lines
348 B
TypeScript
13 lines
348 B
TypeScript
import type { PageServerLoad } from './$types';
|
|
import { getFilamentByColor } from '$lib/server/database/filament';
|
|
|
|
export const load = async ({ params }: Parameters<PageServerLoad>[0]) => {
|
|
let { id } = params;
|
|
if (id) {
|
|
id = id.replaceAll('-', ' ');
|
|
}
|
|
|
|
const filament = await getFilamentByColor(id);
|
|
return { id, filament: filament };
|
|
};
|