new clients page
This commit is contained in:
9
src/routes/clients/+page.ts
Normal file
9
src/routes/clients/+page.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { PageLoad } from './$types';
|
||||
import type { Clients } from '../api/clients/+server';
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
const res = await fetch('/api/clients');
|
||||
const { clients } = await res.json() as { clients: Clients };
|
||||
|
||||
return { clients };
|
||||
};
|
||||
Reference in New Issue
Block a user