feat(cloud-page) - setup1

This commit is contained in:
2025-09-25 03:26:23 +05:30
parent e86aefd62f
commit ac6d906e03
12 changed files with 979 additions and 206 deletions

View File

@@ -0,0 +1,12 @@
/**
* Helper: convert Prisma CloudFile result to JSON-friendly object.
*/
export function serializeFile(f: any) {
if (!f) return null;
return {
...f,
fileSize: typeof f.fileSize === "bigint" ? f.fileSize.toString() : f.fileSize,
createdAt: f.createdAt?.toISOString?.(),
updatedAt: f.updatedAt?.toISOString?.(),
};
}