10 lines
262 B
TypeScript
10 lines
262 B
TypeScript
import type { PageServerLoad } from './$types.js';
|
|
|
|
export const load: PageServerLoad = async ({ locals }) => {
|
|
const allPosts = await locals.prisma.photoPost.findMany({
|
|
orderBy: { createdAt: 'asc' },
|
|
});
|
|
return {
|
|
allPosts,
|
|
};
|
|
};
|