mirror of
https://github.com/dokploy/dokploy.git
synced 2026-06-13 19:09:49 +00:00
feat: use zod-form-data schema for dropDeployment input
Switch from z.instanceof(FormData) to uploadFileSchema (zod-form-data) so the OpenAPI generator produces a proper multipart/form-data spec with typed fields (zip as binary, applicationId, dropBuildPath). Regenerate openapi.json with the drop-deployment endpoint included.
This commit is contained in:
@@ -66,6 +66,7 @@ import {
|
||||
myQueue,
|
||||
} from "@/server/queues/queueSetup";
|
||||
import { cancelDeployment, deploy } from "@/server/utils/deploy";
|
||||
import { uploadFileSchema } from "@/utils/schema";
|
||||
|
||||
export const applicationRouter = createTRPCRouter({
|
||||
create: protectedProcedure
|
||||
@@ -811,13 +812,11 @@ export const applicationRouter = createTRPCRouter({
|
||||
override: true,
|
||||
},
|
||||
})
|
||||
.input(z.instanceof(FormData))
|
||||
.input(uploadFileSchema)
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
const formData = input;
|
||||
|
||||
const zipFile = formData.get("zip") as File;
|
||||
const applicationId = formData.get("applicationId") as string;
|
||||
const dropBuildPath = formData.get("dropBuildPath") as string | null;
|
||||
const zipFile = input.zip;
|
||||
const applicationId = input.applicationId as string;
|
||||
const dropBuildPath = input.dropBuildPath ?? null;
|
||||
|
||||
const app = await findApplicationById(applicationId);
|
||||
|
||||
|
||||
+48975
-21202
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user