Skip to content

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

🐛 Default to pro space when self-hosting (#2031)

Luke Vella81bd04261c8b
diff --git a/apps/web/src/features/space/mutations.ts b/apps/web/src/features/space/mutations.ts
index 056c97d24..2b2cbb986 100644
--- a/apps/web/src/features/space/mutations.ts
+++ b/apps/web/src/features/space/mutations.ts
@@ -1,16 +1,21 @@
+import type { SpaceTier } from "@rallly/database";
import { prisma } from "@rallly/database";
+import { isSelfHosted } from "@/utils/constants";
export async function createSpace({
name = "Personal",
ownerId,
+ tier = isSelfHosted ? "pro" : "hobby",
}: {
name?: string;
ownerId: string;
+ tier?: SpaceTier;
}) {
const space = await prisma.space.create({
data: {
name,
ownerId,
+ tier,
members: {
create: {
userId: ownerId,