mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-18 06:20:29 +00:00
Remove explicit status code from sendError calls
Eliminated the explicit 500 status code parameter from sendError calls in RestartProcessHandler, allowing sendError to use its default behavior.
This commit is contained in:
parent
d1abf788a5
commit
f4d3d33954
@ -13,9 +13,9 @@ export async function RestartProcessHandler (_req: Request, res: Response) {
|
||||
if (result.result) {
|
||||
return sendSuccess(res, { message: result.message || '进程重启请求已发送' });
|
||||
} else {
|
||||
return sendError(res, result.message || '进程重启失败', 500);
|
||||
return sendError(res, result.message || '进程重启失败');
|
||||
}
|
||||
} catch (e) {
|
||||
return sendError(res, '重启进程时发生错误: ' + (e as Error).message, 500);
|
||||
return sendError(res, '重启进程时发生错误: ' + (e as Error).message);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user