9 lines
282 B
TypeScript
9 lines
282 B
TypeScript
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 };
|
|
};
|