feat: react zitadel
This commit is contained in:
5
modules/account/routes/create/handle.ts
Normal file
5
modules/account/routes/create/handle.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import route from "./spec.ts";
|
||||
|
||||
export default route.handle(async ({ body }) => {
|
||||
console.log(body);
|
||||
});
|
||||
13
modules/account/routes/create/spec.ts
Normal file
13
modules/account/routes/create/spec.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { route } from "@platform/relay";
|
||||
import z from "zod";
|
||||
|
||||
export default route.post("/api/v1/account").body(
|
||||
z.strictObject({
|
||||
tenantId: z.uuid().describe("Tenant identifier the account belongs to"),
|
||||
userId: z.uuid().describe("User identifier the account belongs to"),
|
||||
account: z.strictObject({
|
||||
type: z.string().describe("Type of account being created"),
|
||||
number: z.number().describe("Unique account identifier to create for the account"),
|
||||
}),
|
||||
}),
|
||||
);
|
||||
5
modules/account/routes/get/handle.ts
Normal file
5
modules/account/routes/get/handle.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import route from "./spec.ts";
|
||||
|
||||
export default route.handle(async ({ params }) => {
|
||||
console.log(params);
|
||||
});
|
||||
6
modules/account/routes/get/spec.ts
Normal file
6
modules/account/routes/get/spec.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { route } from "@platform/relay";
|
||||
import z from "zod";
|
||||
|
||||
export default route.get("/api/v1/account/:number").params({
|
||||
number: z.number().describe("Account number to retrieve"),
|
||||
});
|
||||
Reference in New Issue
Block a user