Skip to content

Commit 30c408b

Browse files
author
Roo
committed
fix: add sourceType to apiCreateCompose and apiCreateApplication
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').
1 parent 8b64815 commit 30c408b

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

packages/server/src/db/schema/application.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ export const apiCreateApplication = createSchema.pick({
387387
description: true,
388388
environmentId: true,
389389
serverId: true,
390+
sourceType: true,
390391
});
391392

392393
export const apiFindOneApplication = z.object({

packages/server/src/db/schema/compose.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export const apiCreateCompose = createSchema.pick({
179179
appName: true,
180180
serverId: true,
181181
composeFile: true,
182+
sourceType: true,
182183
});
183184

184185
export const apiCreateComposeByTemplate = createSchema

0 commit comments

Comments
 (0)