From 5923acf22f1eb094cfab0d108d59ad9748683e2b Mon Sep 17 00:00:00 2001 From: SALTWOOD <105980161+SALTWOOD@users.noreply.github.com> Date: Sat, 9 Nov 2024 20:23:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Owner=20=E9=BB=98=E8=AE=A4=E4=B8=BA=2080?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/database/Cluster.ts | 2 +- src/index.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/database/Cluster.ts b/src/database/Cluster.ts index 718c781..5593acc 100644 --- a/src/database/Cluster.ts +++ b/src/database/Cluster.ts @@ -36,7 +36,7 @@ export class ClusterEntity { public port: number = 80; - public owner: number = 80; + public owner: number = 0; public downReason: string = ''; diff --git a/src/index.ts b/src/index.ts index 30c7003..bf76172 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,10 +5,6 @@ import { Utilities } from './Utilities.js'; import { HttpRequest } from "./HttpRequest.js"; import fs from 'fs'; -function createFolderIfNotExist(folder: string) { - if (!fs.existsSync(folder)) fs.mkdirSync(folder, { recursive: true }); -} - function onStop(signal: string) { server.db.close(); server.stats.forEach(stats => stats.stopAutoSave()); @@ -26,7 +22,7 @@ const requiredFolders = [ ]; for (const folder of requiredFolders) { - createFolderIfNotExist(folder); + if (!fs.existsSync(folder)) fs.mkdirSync(folder, { recursive: true }); } // 初始化配置