Initial commit of Step Admin panel
This commit is contained in:
8
src/routes/certificates/+page.server.ts
Normal file
8
src/routes/certificates/+page.server.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { getDb } from '$lib/server/db';
|
||||
import type { CertificateRecord } from '$lib/types';
|
||||
|
||||
export const load = async () => {
|
||||
const db = getDb();
|
||||
const certs = db.prepare(`SELECT * FROM certificates ORDER BY created_at DESC`).all() as CertificateRecord[];
|
||||
return { certs };
|
||||
};
|
||||
Reference in New Issue
Block a user