mirror of
https://github.com/KevinMidboe/infra-map.git
synced 2025-12-08 20:29:05 +00:00
working nice. docker uses bun
This commit is contained in:
13
src/routes/printer/filament/[id]/+page.server.ts
Normal file
13
src/routes/printer/filament/[id]/+page.server.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { getFilamentByColor } from '$lib/server/database';
|
||||
|
||||
export const load = async ({ params }: Parameters<PageServerLoad>[0]) => {
|
||||
let { id } = params;
|
||||
if (id) {
|
||||
id = id.replaceAll('-', ' ');
|
||||
}
|
||||
|
||||
const filament = await getFilamentByColor(id);
|
||||
console.log('fil:', filament);
|
||||
return { id, filament: filament };
|
||||
};
|
||||
Reference in New Issue
Block a user