mirror of
https://github.com/crystelf/crystelf-core.git
synced 2025-07-04 14:49:19 +00:00
优化
This commit is contained in:
parent
b73772420a
commit
4c1a93ce14
@ -29,8 +29,8 @@ class SystemController {
|
|||||||
try {
|
try {
|
||||||
const token = req.body.token;
|
const token = req.body.token;
|
||||||
if (tools.checkToken(token.toString())) {
|
if (tools.checkToken(token.toString())) {
|
||||||
await SystemService.systemRestart();
|
|
||||||
await response.success(res, '核心正在重启..');
|
await response.success(res, '核心正在重启..');
|
||||||
|
await SystemService.systemRestart();
|
||||||
} else {
|
} else {
|
||||||
await tools.tokenCheckFailed(res, token);
|
await tools.tokenCheckFailed(res, token);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ async function testGetAPI() {
|
|||||||
|
|
||||||
async function testPostAPI() {
|
async function testPostAPI() {
|
||||||
try {
|
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,
|
token: 114113,
|
||||||
});
|
});
|
||||||
console.log('[HTTP][POST] Response:', response.data);
|
console.log('[HTTP][POST] Response:', response.data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user