feat: add payment module
This commit is contained in:
4
modules/payment/routes/ledgers/wallets/handle.ts
Normal file
4
modules/payment/routes/ledgers/wallets/handle.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { getWalletsByLedgerId } from "../../../repositories/wallet.ts";
|
||||
import route from "./spec.ts";
|
||||
|
||||
export default route.access("public").handle(async ({ params: { id } }) => getWalletsByLedgerId(id));
|
||||
9
modules/payment/routes/ledgers/wallets/spec.ts
Normal file
9
modules/payment/routes/ledgers/wallets/spec.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { route } from "@platform/relay";
|
||||
import z from "zod";
|
||||
|
||||
import { WalletSchema } from "../../../schemas/wallet.ts";
|
||||
|
||||
export default route
|
||||
.get("/api/v1/payment/ledgers/:id/wallets")
|
||||
.params({ id: z.uuid() })
|
||||
.response(z.array(WalletSchema));
|
||||
Reference in New Issue
Block a user