mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-22 09:52:50 +00:00
polish
This commit is contained in:
9
src/routes/(app)/firmware/+page.ts
Normal file
9
src/routes/(app)/firmware/+page.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
import type { DirectoryListing } from "./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;
|
||||
Reference in New Issue
Block a user