|
|
@ -15,13 +15,13 @@ router.get('/dashboard-hidden-service', auth.jwt, safeHandler(async (req, res) = |
|
|
|
return res.status(constants.STATUS_CODES.OK).json(url); |
|
|
|
})); |
|
|
|
|
|
|
|
router.get('/shutdown', auth.jwt, safeHandler(async (req, res) => { |
|
|
|
router.post('/shutdown', auth.jwt, safeHandler(async (req, res) => { |
|
|
|
const result = await systemLogic.requestShutdown(); |
|
|
|
|
|
|
|
return res.status(constants.STATUS_CODES.OK).json(result); |
|
|
|
})); |
|
|
|
|
|
|
|
router.get('/reboot', auth.jwt, safeHandler(async (req, res) => { |
|
|
|
router.post('/reboot', auth.jwt, safeHandler(async (req, res) => { |
|
|
|
const result = await systemLogic.requestReboot(); |
|
|
|
|
|
|
|
return res.status(constants.STATUS_CODES.OK).json(result); |
|
|
|