From 4c1a93ce1439097cb70c700579183aa68c07c4ce Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 4 May 2025 10:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/system/system.controller.ts | 2 +- src/test/wsTestClient.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/system/system.controller.ts b/src/modules/system/system.controller.ts index 8e71728..6ff0850 100644 --- a/src/modules/system/system.controller.ts +++ b/src/modules/system/system.controller.ts @@ -29,8 +29,8 @@ class SystemController { try { const token = req.body.token; if (tools.checkToken(token.toString())) { - await SystemService.systemRestart(); await response.success(res, '核心正在重启..'); + await SystemService.systemRestart(); } else { await tools.tokenCheckFailed(res, token); } diff --git a/src/test/wsTestClient.ts b/src/test/wsTestClient.ts index 9d7e9a7..8552e92 100644 --- a/src/test/wsTestClient.ts +++ b/src/test/wsTestClient.ts @@ -48,7 +48,7 @@ async function testGetAPI() { async function testPostAPI() { try { - const response = await axios.post('https://core.crystelf.top/api/system/getRestartTime', { + const response = await axios.post('https://core.crystelf.top/api/system/restart', { token: 114113, }); console.log('[HTTP][POST] Response:', response.data);