You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
516 B

import PocketBase from "pocketbase";
export const dynamic = 'auto',
fetchCache = 'force-no-store'
async function getPosts() {
const client = new PocketBase('https://backend.saachen.lu');
const adminAuthData = await client.admins.authViaEmail(process.env.USERNAME, process.env.PASSWORD);
const resultList = await client.records.getList('blogposts', 1, 50, {
filter: 'created >= "2022-01-01 00:00:00"',
expand: 'categories'
});
return resultList;
}
export default getPosts();