Skip to content

Open-source status page, incident response and uptime monitoring

🕵️ who am i (#1068)

Thibault Le Ouayf8cbf5f4a056
diff --git a/apps/docs/api-reference/whoami/get-whoami.mdx b/apps/docs/api-reference/whoami/get-whoami.mdx
index 384b0012d..664446090 100644
--- a/apps/docs/api-reference/whoami/get-whoami.mdx
+++ b/apps/docs/api-reference/whoami/get-whoami.mdx
@@ -1,4 +1,4 @@
---
title: Get a Whoami
-openapi: get /status_report/:id
+openapi: get /whoami
---
diff --git a/apps/server/src/v1/whoami/index.ts b/apps/server/src/v1/whoami/index.ts
index ffd520298..e209260f5 100644
--- a/apps/server/src/v1/whoami/index.ts
+++ b/apps/server/src/v1/whoami/index.ts
@@ -1,7 +1,10 @@
import { OpenAPIHono } from "@hono/zod-openapi";
import type { Variables } from "..";
import { handleZodError } from "../../libs/errors";
+import { registerGetWhoami } from "./get";
export const whoamiApi = new OpenAPIHono<{ Variables: Variables }>({
defaultHook: handleZodError,
-}); // Compare this snippet from apps/server/src/v1/whoami/index.ts:
+});
+
+registerGetWhoami(whoamiApi);
diff --git a/apps/server/src/v1/whoami/schema.ts b/apps/server/src/v1/whoami/schema.ts
index da278590d..7458f3dff 100644
--- a/apps/server/src/v1/whoami/schema.ts
+++ b/apps/server/src/v1/whoami/schema.ts
@@ -7,6 +7,11 @@ export const schema = z.object({
workspaceId: z.number().openapi({
description: "The current workspace id",
}),
+ name: z
+ .string()
+ .openapi({ description: "The current workspace name" })
+ .optional(),
+ slub: z.string().openapi({ description: "The current workspace slug" }),
plan: z
.enum(workspacePlans)
.nullable()