get all poems workin, get semantic search workin, get thoughts section working
This commit is contained in:
15
src/routes/(app)/thoughts/+page.server.ts
Normal file
15
src/routes/(app)/thoughts/+page.server.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export const load = async ({ fetch, url }) => {
|
||||
const limit = 8;
|
||||
|
||||
const page = Number(url.searchParams.get('page')) || 1;
|
||||
|
||||
const response = await fetch(`/api/thoughts?limit=${limit}&page=${page}`);
|
||||
const { posts, total } = await response.json();
|
||||
|
||||
return {
|
||||
posts,
|
||||
total,
|
||||
page,
|
||||
limit
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user