From 71004c61b2aa1f8e4d88cbe72824aac31b79108b Mon Sep 17 00:00:00 2001 From: James Murdza Date: Sun, 18 Aug 2024 06:52:41 -0700 Subject: [PATCH] fix: remove enum for project types --- backend/database/src/index.ts | 2 +- backend/database/src/schema.ts | 2 +- backend/storage/src/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/database/src/index.ts b/backend/database/src/index.ts index 4eb9180..f4eec2a 100644 --- a/backend/database/src/index.ts +++ b/backend/database/src/index.ts @@ -101,7 +101,7 @@ export default { return success } else if (method === "PUT") { const initSchema = z.object({ - type: z.enum(["react", "node"]), + type: z.string(), name: z.string(), userId: z.string(), visibility: z.enum(["public", "private"]), diff --git a/backend/database/src/schema.ts b/backend/database/src/schema.ts index 4403b96..0d088dd 100644 --- a/backend/database/src/schema.ts +++ b/backend/database/src/schema.ts @@ -26,7 +26,7 @@ export const sandbox = sqliteTable("sandbox", { .primaryKey() .unique(), name: text("name").notNull(), - type: text("type", { enum: ["react", "node"] }).notNull(), + type: text("type").notNull(), visibility: text("visibility", { enum: ["public", "private"] }), createdAt: integer("createdAt", { mode: "timestamp_ms" }), userId: text("user_id") diff --git a/backend/storage/src/index.ts b/backend/storage/src/index.ts index 47da23a..a375f30 100644 --- a/backend/storage/src/index.ts +++ b/backend/storage/src/index.ts @@ -137,7 +137,7 @@ export default { } else if (path === "/api/init" && method === "POST") { const initSchema = z.object({ sandboxId: z.string(), - type: z.enum(["react", "node"]), + type: z.string(), }) const body = await request.json()