Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

🕵️ who am i (#1068)

authored by

Thibault Le Ouay and committed by
GitHub
f8cbf5f4 7c637ff1

+10 -2
+1 -1
apps/docs/api-reference/whoami/get-whoami.mdx
··· 1 1 --- 2 2 title: Get a Whoami 3 - openapi: get /status_report/:id 3 + openapi: get /whoami 4 4 ---
+4 -1
apps/server/src/v1/whoami/index.ts
··· 1 1 import { OpenAPIHono } from "@hono/zod-openapi"; 2 2 import type { Variables } from ".."; 3 3 import { handleZodError } from "../../libs/errors"; 4 + import { registerGetWhoami } from "./get"; 4 5 5 6 export const whoamiApi = new OpenAPIHono<{ Variables: Variables }>({ 6 7 defaultHook: handleZodError, 7 - }); // Compare this snippet from apps/server/src/v1/whoami/index.ts: 8 + }); 9 + 10 + registerGetWhoami(whoamiApi);
+5
apps/server/src/v1/whoami/schema.ts
··· 7 7 workspaceId: z.number().openapi({ 8 8 description: "The current workspace id", 9 9 }), 10 + name: z 11 + .string() 12 + .openapi({ description: "The current workspace name" }) 13 + .optional(), 14 + slub: z.string().openapi({ description: "The current workspace slug" }), 10 15 plan: z 11 16 .enum(workspacePlans) 12 17 .nullable()