Files
aktiteil/src/routes/+page.server.ts
T
schreifuchs c459d58a28
Commit / ci (push) Successful in 10m34s
PullRequest / publish (pull_request) Failing after 2m17s
refactor: abstract heavy database queries (resolves #10)
2026-04-03 13:26:55 +02:00

11 lines
310 B
TypeScript

import { getAktisWithAvgRating } from '$lib/server/db/queries';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async () => {
const a = await getAktisWithAvgRating();
return {
aktis: a.map((a) => ({ ...a, rating: a.rating ? parseFloat(a.rating) : undefined }))
};
};