backups: move mount status to separate route
This commit is contained in:
@@ -6,6 +6,7 @@ exports = module.exports = {
|
||||
create,
|
||||
cleanup,
|
||||
remount,
|
||||
getMountStatus
|
||||
};
|
||||
|
||||
const assert = require('assert'),
|
||||
@@ -63,3 +64,9 @@ async function remount(req, res, next) {
|
||||
|
||||
next(new HttpSuccess(202, {}));
|
||||
}
|
||||
|
||||
async function getMountStatus(req, res, next) {
|
||||
const [error, mountStatus] = await safe(backups.getMountStatus());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
next(new HttpSuccess(200, mountStatus));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user