mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-15 13:21:11 +00:00
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').
This commit is contained in:
@@ -387,6 +387,7 @@ export const apiCreateApplication = createSchema.pick({
|
||||
description: true,
|
||||
environmentId: true,
|
||||
serverId: true,
|
||||
sourceType: true,
|
||||
});
|
||||
|
||||
export const apiFindOneApplication = z.object({
|
||||
|
||||
@@ -179,6 +179,7 @@ export const apiCreateCompose = createSchema.pick({
|
||||
appName: true,
|
||||
serverId: true,
|
||||
composeFile: true,
|
||||
sourceType: true,
|
||||
});
|
||||
|
||||
export const apiCreateComposeByTemplate = createSchema
|
||||
|
||||
Reference in New Issue
Block a user