11 lines
310 B
TypeScript
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 }))
|
|
};
|
|
};
|