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,7 @@
import { Router } from "express";
const router = Router();
export default router;

View File

@@ -12,6 +12,7 @@ import paymentsRoutes from "./payments";
import databaseManagementRoutes from "./database-management";
import notificationsRoutes from "./notifications";
import paymentOcrRoutes from "./paymentOcrExtraction";
import cloudStorageRoutes from "./cloud-storage";
const router = Router();
@@ -28,5 +29,6 @@ router.use("/payments", paymentsRoutes);
router.use("/database-management", databaseManagementRoutes);
router.use("/notifications", notificationsRoutes);
router.use("/payment-ocr", paymentOcrRoutes);
router.use("/cloud-storage", cloudStorageRoutes);
export default router;

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?.(),
};
}