Template
1
0

feat: add payment module

This commit is contained in:
2025-12-05 01:56:42 +01:00
parent a818f3135a
commit be9b8e9e55
160 changed files with 8615 additions and 1158 deletions

View File

@@ -0,0 +1,16 @@
import { nestMany } from "@platform/parse";
import { route } from "@platform/relay";
import z from "zod";
import { BeneficiarySchema } from "../../schemas/beneficiary.ts";
import { LedgerSchema } from "../../schemas/ledger.ts";
export const DashboardSchema = z.strictObject({
...BeneficiarySchema.shape,
ledgers: nestMany(LedgerSchema),
});
export default route
.get("/api/v1/payment/dashboard/:id")
.params({ id: BeneficiarySchema.shape._id })
.response(DashboardSchema);