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,4 @@
import { getAccountsByWalletId } from "../../../repositories/account.ts";
import route from "./spec.ts";
export default route.access("public").handle(async ({ params: { id } }) => getAccountsByWalletId(id));

View File

@@ -0,0 +1,9 @@
import { route } from "@platform/relay";
import z from "zod";
import { AccountSchema } from "../../../schemas/account.ts";
export default route
.get("/api/v1/payment/wallets/:id/accounts")
.params({ id: z.uuid() })
.response(z.array(AccountSchema));

View File

@@ -0,0 +1,4 @@
import { createWallet } from "../../../repositories/wallet.ts";
import route from "./spec.ts";
export default route.access("public").handle(async ({ body }) => createWallet(body));

View File

@@ -0,0 +1,6 @@
import { route } from "@platform/relay";
import z from "zod";
import { WalletInsertSchema } from "../../../schemas/wallet.ts";
export default route.post("/api/v1/payment/wallets").body(WalletInsertSchema).response(z.uuid());