mirror of
https://github.com/KevinMidboe/infra-map.git
synced 2025-10-29 01:20:29 +00:00
12 lines
475 B
TypeScript
12 lines
475 B
TypeScript
import type { PageServerLoad } from './$types';
|
|
import { fetchP1P } from '$lib/server/homeassistant';
|
|
import { currentFilament } from '$lib/server/filament';
|
|
import type { Entity } from '$lib/interfaces/homeassistant';
|
|
import type { Filament } from '$lib/interfaces/printer';
|
|
|
|
export const load: PageServerLoad = async (): Promise<{ p1p: Entity[]; filament: Filament[] }> => {
|
|
const p1p = await fetchP1P();
|
|
const filament = currentFilament();
|
|
return { p1p, filament };
|
|
};
|