From 30c408b130cd0b50f670725378d7fe228886c3ca Mon Sep 17 00:00:00 2001 From: Roo Date: Mon, 29 Jun 2026 23:37:47 -0400 Subject: [PATCH] fix: add sourceType to apiCreateCompose and apiCreateApplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apiCreateCompose and apiCreateApplication did not include sourceType in their .pick() schemas, causing every compose/application created via the API to default to 'github' in the DB. Users had to manually update the sourceType after creation. sourceType is already defined as .optional() in both createSchemas, so this is backward-compatible — callers that don't send it will still get the DB default ('github'). --- packages/server/src/db/schema/application.ts | 1 + packages/server/src/db/schema/compose.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/server/src/db/schema/application.ts b/packages/server/src/db/schema/application.ts index 59dfd3716..40b80ef20 100644 --- a/packages/server/src/db/schema/application.ts +++ b/packages/server/src/db/schema/application.ts @@ -387,6 +387,7 @@ export const apiCreateApplication = createSchema.pick({ description: true, environmentId: true, serverId: true, + sourceType: true, }); export const apiFindOneApplication = z.object({ diff --git a/packages/server/src/db/schema/compose.ts b/packages/server/src/db/schema/compose.ts index 7803cb0a7..3f7699ad0 100644 --- a/packages/server/src/db/schema/compose.ts +++ b/packages/server/src/db/schema/compose.ts @@ -179,6 +179,7 @@ export const apiCreateCompose = createSchema.pick({ appName: true, serverId: true, composeFile: true, + sourceType: true, }); export const apiCreateComposeByTemplate = createSchema