fix:remove api logic from page server and move to api

This commit is contained in:
2025-10-13 12:35:44 +02:00
parent b95c7dad7b
commit 88ed74fde2
3 changed files with 155 additions and 178 deletions

View File

@@ -17,7 +17,7 @@
locationName?: string;
category?: string;
isPublic: number;
createdAt: Date;
createdAt: string; // Will be converted to Date type, but is a string from api
userId: string;
username: string;
media: Array<{
@@ -83,6 +83,7 @@
let finds = $derived(
(data.finds || ([] as ServerFind[])).map((serverFind: ServerFind) => ({
...serverFind,
createdAt: new Date(serverFind.createdAt), // Convert string to Date
user: {
id: serverFind.userId,
username: serverFind.username