mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-16 17:05:17 +00:00
fix(settings): correct database query syntax in reconnectServicesToTraefik function
- Updated the database query in the `reconnectServicesToTraefik` function to remove optional chaining, ensuring proper execution of the query. - This change enhances the reliability of service reconnections to Traefik by ensuring the database connection is correctly utilized.
This commit is contained in:
@@ -5,7 +5,9 @@ import {
|
|||||||
execAsyncRemote,
|
execAsyncRemote,
|
||||||
} from "@dokploy/server/utils/process/execAsync";
|
} from "@dokploy/server/utils/process/execAsync";
|
||||||
import { and, eq } from "drizzle-orm";
|
import { and, eq } from "drizzle-orm";
|
||||||
|
|
||||||
import semver from "semver";
|
import semver from "semver";
|
||||||
|
import { db } from "../db";
|
||||||
import { compose } from "../db/schema";
|
import { compose } from "../db/schema";
|
||||||
import {
|
import {
|
||||||
initializeStandaloneTraefik,
|
initializeStandaloneTraefik,
|
||||||
@@ -455,7 +457,7 @@ export const writeTraefikSetup = async (input: TraefikOptions) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const reconnectServicesToTraefik = async (serverId?: string) => {
|
export const reconnectServicesToTraefik = async (serverId?: string) => {
|
||||||
const composeResult = await db?.query.compose.findMany({
|
const composeResult = await db.query.compose.findMany({
|
||||||
where: and(
|
where: and(
|
||||||
...(serverId ? [eq(compose.serverId, serverId)] : []),
|
...(serverId ? [eq(compose.serverId, serverId)] : []),
|
||||||
eq(compose.isolatedDeployment, true),
|
eq(compose.isolatedDeployment, true),
|
||||||
|
|||||||
Reference in New Issue
Block a user