Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🚧 Add option to explicitly set space when creating poll

Luke Vella68df9f0c0530
diff --git a/apps/web/src/app/api/private/schemas.ts b/apps/web/src/app/api/private/schemas.ts
index c45cbb58a..9142c9ceb 100644
--- a/apps/web/src/app/api/private/schemas.ts
+++ b/apps/web/src/app/api/private/schemas.ts
@@ -98,6 +98,11 @@ export const createPollInputSchema = z
description: "Disable the comments section",
example: false,
}),
+ spaceId: z.string().optional().openapi({
+ description:
+ "ID of the space to create the poll in. Defaults to user's most recently used space.",
+ example: "space_abc123",
+ }),
dates: datesInputSchema.optional(),
slots: slotsInputSchema.optional(),
})
@@ -119,6 +124,16 @@ export const createPollSuccessResponseSchema = z
inviteUrl: z
.string()
.openapi({ example: "https://example.com/invite/p_123abc" }),
+ space: z
+ .object({
+ id: z.string(),
+ name: z.string(),
+ })
+ .nullable()
+ .openapi({
+ description: "The space the poll was created in, or null if personal",
+ example: { id: "space_abc123", name: "My Team" },
+ }),
}),
})
.openapi("CreatePollResponse");