From cb5800f61b9b30f375fba303b1739ee62efe2ecc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 31 Dec 2025 06:13:28 +0000 Subject: [PATCH] Use static import for nanoid in webhook files Co-authored-by: Siumauricio <47042324+Siumauricio@users.noreply.github.com> --- apps/dokploy/pages/api/deploy/[refreshToken].ts | 2 +- apps/dokploy/pages/api/deploy/compose/[refreshToken].ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/pages/api/deploy/[refreshToken].ts b/apps/dokploy/pages/api/deploy/[refreshToken].ts index d12eea5cf..908184631 100644 --- a/apps/dokploy/pages/api/deploy/[refreshToken].ts +++ b/apps/dokploy/pages/api/deploy/[refreshToken].ts @@ -5,6 +5,7 @@ import { shouldDeploy, } from "@dokploy/server"; import { eq } from "drizzle-orm"; +import { nanoid } from "nanoid"; import type { NextApiRequest, NextApiResponse } from "next"; import { db } from "@/server/db"; import { applications } from "@/server/db/schema"; @@ -231,7 +232,6 @@ export default async function handler( } try { - const { nanoid } = await import("nanoid"); const jobId = nanoid(); const jobData: DeploymentJob = { applicationId: application.applicationId as string, diff --git a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts index f47600229..e3481b5df 100644 --- a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts +++ b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts @@ -1,5 +1,6 @@ import { IS_CLOUD, shouldDeploy } from "@dokploy/server"; import { eq } from "drizzle-orm"; +import { nanoid } from "nanoid"; import type { NextApiRequest, NextApiResponse } from "next"; import { db } from "@/server/db"; import { compose } from "@/server/db/schema"; @@ -168,7 +169,6 @@ export default async function handler( } try { - const { nanoid } = await import("nanoid"); const jobId = nanoid(); const jobData: DeploymentJob = { composeId: composeResult.composeId as string,