mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-12 01:15:23 +02:00
refactor(settings): migrate user settings to webServerSettings schema and update related components
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { paths } from "@dokploy/server/constants";
|
||||
import type { User } from "@dokploy/server/services/user";
|
||||
import type { webServerSettings } from "@dokploy/server/db/schema/web-server-settings";
|
||||
import { parse, stringify } from "yaml";
|
||||
import {
|
||||
loadOrCreateConfig,
|
||||
@@ -12,10 +12,10 @@ import type { FileConfig } from "./file-types";
|
||||
import type { MainTraefikConfig } from "./types";
|
||||
|
||||
export const updateServerTraefik = (
|
||||
user: User | null,
|
||||
settings: typeof webServerSettings.$inferSelect | null,
|
||||
newHost: string | null,
|
||||
) => {
|
||||
const { https, certificateType } = user || {};
|
||||
const { https, certificateType } = settings || {};
|
||||
const appName = "dokploy";
|
||||
const config: FileConfig = loadOrCreateConfig(appName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user