thomaswilson-sveltekit/src/routes/photo-posts/+page.server.ts

11 lines
262 B
TypeScript
Raw Normal View History

2026-03-01 08:52:30 +00:00
import type { PageServerLoad } from './$types.js';
export const load: PageServerLoad = async ({ locals }) => {
const allPosts = await locals.prisma.photoPost.findMany({
orderBy: { createdAt: 'asc' },
});
return {
allPosts,
};
};