add volume remount
This commit is contained in:
@@ -6,6 +6,7 @@ exports = module.exports = {
|
||||
del,
|
||||
list,
|
||||
load,
|
||||
remount,
|
||||
getStatus
|
||||
};
|
||||
|
||||
@@ -66,6 +67,14 @@ async function list(req, res, next) {
|
||||
next(new HttpSuccess(200, { volumes: allVolumes }));
|
||||
}
|
||||
|
||||
async function remount(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.id, 'string');
|
||||
|
||||
const [error] = await safe(volumes.remount(req.volume, AuditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
next(new HttpSuccess(202));
|
||||
}
|
||||
|
||||
async function getStatus(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.id, 'string');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user