fix: handle empty filter param and add created/updated fields for PB 0.25 compat
This commit is contained in:
@@ -20,7 +20,7 @@ export const GET = withAuth(async (request: NextRequest) => {
|
||||
|
||||
const pb = createPocketBaseClient();
|
||||
const result = await pb.collection('habit_logs').getList(1, 1000, {
|
||||
filter,
|
||||
...(filter ? { filter } : {}),
|
||||
sort: '-logged_at',
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user