Files
DeviceManager/src/routes/(app)/ccos/+page.ts
2025-02-13 16:17:46 +01:00

10 lines
333 B
TypeScript

import type { PageLoad } from "./$types";
import type { DirectoryListing } from "$lib/meta/types/listing";
export const load = (async ({ fetch }) => {
const result = await fetch(`${import.meta.env.VITE_FIRMWARE_URL}/`);
const data = await result.json();
return { devices: data as DirectoryListing[] };
}) satisfies PageLoad;