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);