From fb4a87f5ce2fb0ed892cf6cd3cb69f00f7130e38 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 5 Nov 2022 15:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=89=88=E6=9C=AC=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/config/index.ts | 2 +- back/services/system.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/back/config/index.ts b/back/config/index.ts index d7a90187..357a405c 100644 --- a/back/config/index.ts +++ b/back/config/index.ts @@ -14,7 +14,7 @@ if (!process.env.QL_DIR) { process.env.QL_DIR = qlHomePath.replace(/\/$/g, ''); } -const lastVersionFile = `https://qn.whyour.cn/version.ts?v=${Date.now()}`; +const lastVersionFile = `https://qn.whyour.cn/version.ts`; const rootPath = process.env.QL_DIR as string; const envFound = dotenv.config({ path: path.join(rootPath, '.env') }); diff --git a/back/services/system.ts b/back/services/system.ts index 5639dd2a..749fd91f 100644 --- a/back/services/system.ts +++ b/back/services/system.ts @@ -89,7 +89,7 @@ export default class SystemService { let lastLog = ''; try { const lastVersionFileContent = await promiseExec( - `curl ${config.lastVersionFile}`, + `curl ${config.lastVersionFile}?t=${Date.now()}`, ); lastVersion = lastVersionFileContent.match(versionRegx)![1]; lastLog = lastVersionFileContent.match(logRegx)