diff --git a/apps/dokploy/components/dashboard/compose/delete-service.tsx b/apps/dokploy/components/dashboard/compose/delete-service.tsx index ff70f3d8e..e75aad5e5 100644 --- a/apps/dokploy/components/dashboard/compose/delete-service.tsx +++ b/apps/dokploy/components/dashboard/compose/delete-service.tsx @@ -101,7 +101,9 @@ export const DeleteService = ({ id, type }: Props) => { deleteVolumes, }) .then((result) => { - push(`/dashboard/project/${result?.environment?.projectId}/environment/${result?.environment?.environmentId}`); + push( + `/dashboard/project/${result?.environment?.projectId}/environment/${result?.environment?.environmentId}`, + ); toast.success("deleted successfully"); setIsOpen(false); }) diff --git a/apps/dokploy/components/dashboard/project/advanced-environment-selector.tsx b/apps/dokploy/components/dashboard/project/advanced-environment-selector.tsx index 67ade4497..532db7a5c 100644 --- a/apps/dokploy/components/dashboard/project/advanced-environment-selector.tsx +++ b/apps/dokploy/components/dashboard/project/advanced-environment-selector.tsx @@ -33,7 +33,10 @@ import { Badge } from "@/components/ui/badge"; import { AlertBlock } from "@/components/shared/alert-block"; import { findEnvironmentById } from "@dokploy/server"; -type Environment = Omit>, "project">; +type Environment = Omit< + Awaited>, + "project" +>; interface AdvancedEnvironmentSelectorProps { projectId: string; currentEnvironmentId?: string; diff --git a/apps/dokploy/components/dashboard/projects/handle-project.tsx b/apps/dokploy/components/dashboard/projects/handle-project.tsx index e1620bed6..d9aad3b8e 100644 --- a/apps/dokploy/components/dashboard/projects/handle-project.tsx +++ b/apps/dokploy/components/dashboard/projects/handle-project.tsx @@ -101,7 +101,9 @@ export const HandleProject = ({ projectId }: Props) => { toast.success(projectId ? "Project Updated" : "Project Created"); setIsOpen(false); if (!projectId) { - router.push(`/dashboard/project/${data?.project?.projectId}/environment/${data?.environment?.environmentId}`); + router.push( + `/dashboard/project/${data?.project?.projectId}/environment/${data?.environment?.environmentId}`, + ); } else { refetch(); } diff --git a/apps/dokploy/server/api/routers/redirects.ts b/apps/dokploy/server/api/routers/redirects.ts index a8034e639..f8b7014f2 100644 --- a/apps/dokploy/server/api/routers/redirects.ts +++ b/apps/dokploy/server/api/routers/redirects.ts @@ -19,7 +19,8 @@ export const redirectsRouter = createTRPCRouter({ .mutation(async ({ input, ctx }) => { const application = await findApplicationById(input.applicationId); if ( - application.environment.project.organizationId !== ctx.session.activeOrganizationId + application.environment.project.organizationId !== + ctx.session.activeOrganizationId ) { throw new TRPCError({ code: "UNAUTHORIZED", @@ -34,7 +35,8 @@ export const redirectsRouter = createTRPCRouter({ const redirect = await findRedirectById(input.redirectId); const application = await findApplicationById(redirect.applicationId); if ( - application.environment.project.organizationId !== ctx.session.activeOrganizationId + application.environment.project.organizationId !== + ctx.session.activeOrganizationId ) { throw new TRPCError({ code: "UNAUTHORIZED", @@ -49,7 +51,8 @@ export const redirectsRouter = createTRPCRouter({ const redirect = await findRedirectById(input.redirectId); const application = await findApplicationById(redirect.applicationId); if ( - application.environment.project.organizationId !== ctx.session.activeOrganizationId + application.environment.project.organizationId !== + ctx.session.activeOrganizationId ) { throw new TRPCError({ code: "UNAUTHORIZED", @@ -64,7 +67,8 @@ export const redirectsRouter = createTRPCRouter({ const redirect = await findRedirectById(input.redirectId); const application = await findApplicationById(redirect.applicationId); if ( - application.environment.project.organizationId !== ctx.session.activeOrganizationId + application.environment.project.organizationId !== + ctx.session.activeOrganizationId ) { throw new TRPCError({ code: "UNAUTHORIZED", diff --git a/packages/server/src/utils/builders/compose.ts b/packages/server/src/utils/builders/compose.ts index f221ce149..92e34eb36 100644 --- a/packages/server/src/utils/builders/compose.ts +++ b/packages/server/src/utils/builders/compose.ts @@ -72,7 +72,10 @@ export const buildCompose = async (compose: ComposeNested, logPath: string) => { NODE_ENV: process.env.NODE_ENV, PATH: process.env.PATH, ...(composeType === "stack" && { - ...getEnviromentVariablesObject(compose.env, compose.environment.project.env), + ...getEnviromentVariablesObject( + compose.env, + compose.environment.project.env, + ), }), }, },