10 lines
274 B
TypeScript
10 lines
274 B
TypeScript
import type { PageLoad } from './$types';
|
|
import type { OpnsenseWgPeers } from '$lib/opnsense/wg';
|
|
|
|
export const load: PageLoad = async ({ fetch }) => {
|
|
const res = await fetch('/api/connections');
|
|
const peers = await res.json() as OpnsenseWgPeers;
|
|
|
|
return { peers };
|
|
};
|