mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-21 19:38:47 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -101,7 +101,9 @@ export const DeleteService = ({ id, type }: Props) => {
|
|||||||
deleteVolumes,
|
deleteVolumes,
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.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");
|
toast.success("deleted successfully");
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -33,7 +33,10 @@ import { Badge } from "@/components/ui/badge";
|
|||||||
import { AlertBlock } from "@/components/shared/alert-block";
|
import { AlertBlock } from "@/components/shared/alert-block";
|
||||||
import { findEnvironmentById } from "@dokploy/server";
|
import { findEnvironmentById } from "@dokploy/server";
|
||||||
|
|
||||||
type Environment = Omit<Awaited<ReturnType<typeof findEnvironmentById>>, "project">;
|
type Environment = Omit<
|
||||||
|
Awaited<ReturnType<typeof findEnvironmentById>>,
|
||||||
|
"project"
|
||||||
|
>;
|
||||||
interface AdvancedEnvironmentSelectorProps {
|
interface AdvancedEnvironmentSelectorProps {
|
||||||
projectId: string;
|
projectId: string;
|
||||||
currentEnvironmentId?: string;
|
currentEnvironmentId?: string;
|
||||||
|
|||||||
@@ -101,7 +101,9 @@ export const HandleProject = ({ projectId }: Props) => {
|
|||||||
toast.success(projectId ? "Project Updated" : "Project Created");
|
toast.success(projectId ? "Project Updated" : "Project Created");
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
if (!projectId) {
|
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 {
|
} else {
|
||||||
refetch();
|
refetch();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ export const redirectsRouter = createTRPCRouter({
|
|||||||
.mutation(async ({ input, ctx }) => {
|
.mutation(async ({ input, ctx }) => {
|
||||||
const application = await findApplicationById(input.applicationId);
|
const application = await findApplicationById(input.applicationId);
|
||||||
if (
|
if (
|
||||||
application.environment.project.organizationId !== ctx.session.activeOrganizationId
|
application.environment.project.organizationId !==
|
||||||
|
ctx.session.activeOrganizationId
|
||||||
) {
|
) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
@@ -34,7 +35,8 @@ export const redirectsRouter = createTRPCRouter({
|
|||||||
const redirect = await findRedirectById(input.redirectId);
|
const redirect = await findRedirectById(input.redirectId);
|
||||||
const application = await findApplicationById(redirect.applicationId);
|
const application = await findApplicationById(redirect.applicationId);
|
||||||
if (
|
if (
|
||||||
application.environment.project.organizationId !== ctx.session.activeOrganizationId
|
application.environment.project.organizationId !==
|
||||||
|
ctx.session.activeOrganizationId
|
||||||
) {
|
) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
@@ -49,7 +51,8 @@ export const redirectsRouter = createTRPCRouter({
|
|||||||
const redirect = await findRedirectById(input.redirectId);
|
const redirect = await findRedirectById(input.redirectId);
|
||||||
const application = await findApplicationById(redirect.applicationId);
|
const application = await findApplicationById(redirect.applicationId);
|
||||||
if (
|
if (
|
||||||
application.environment.project.organizationId !== ctx.session.activeOrganizationId
|
application.environment.project.organizationId !==
|
||||||
|
ctx.session.activeOrganizationId
|
||||||
) {
|
) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
@@ -64,7 +67,8 @@ export const redirectsRouter = createTRPCRouter({
|
|||||||
const redirect = await findRedirectById(input.redirectId);
|
const redirect = await findRedirectById(input.redirectId);
|
||||||
const application = await findApplicationById(redirect.applicationId);
|
const application = await findApplicationById(redirect.applicationId);
|
||||||
if (
|
if (
|
||||||
application.environment.project.organizationId !== ctx.session.activeOrganizationId
|
application.environment.project.organizationId !==
|
||||||
|
ctx.session.activeOrganizationId
|
||||||
) {
|
) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "UNAUTHORIZED",
|
code: "UNAUTHORIZED",
|
||||||
|
|||||||
@@ -72,7 +72,10 @@ export const buildCompose = async (compose: ComposeNested, logPath: string) => {
|
|||||||
NODE_ENV: process.env.NODE_ENV,
|
NODE_ENV: process.env.NODE_ENV,
|
||||||
PATH: process.env.PATH,
|
PATH: process.env.PATH,
|
||||||
...(composeType === "stack" && {
|
...(composeType === "stack" && {
|
||||||
...getEnviromentVariablesObject(compose.env, compose.environment.project.env),
|
...getEnviromentVariablesObject(
|
||||||
|
compose.env,
|
||||||
|
compose.environment.project.env,
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user