Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Add is-sd-card-failing API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Briscoe committed Sep 26, 2022
1 parent 069acff commit ae4986c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routes/v1/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ router.get('/is-umbrel-os', auth.jwt, safeHandler(async (req, res) => {
return res.status(constants.STATUS_CODES.OK).json(constants.IS_UMBREL_OS);
}));

router.get('/is-sd-card-failing', auth.jwt, safeHandler(async (req, res) => {
const update = await diskLogic.readSystemStatusFile('sd-card-health');

const failing = (update !== null) ? update : false;

return res.status(constants.STATUS_CODES.OK).json(failing);
}));

module.exports = router;

0 comments on commit ae4986c

Please sign in to comment.