services: add recoveryMode
This commit is contained in:
@@ -40,9 +40,11 @@ async function configure(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.service, 'string');
|
||||
|
||||
if (typeof req.body.memoryLimit !== 'number') return next(new HttpError(400, 'memoryLimit must be a number'));
|
||||
if ('recoveryMode' in req.body && typeof req.body.recoveryMode !== 'boolean') return next(new HttpError(400, 'recoveryMode must be boolean'));
|
||||
|
||||
const data = {
|
||||
memoryLimit: req.body.memoryLimit
|
||||
memoryLimit: req.body.memoryLimit,
|
||||
recoveryMode: req.body.recoveryMode || false
|
||||
};
|
||||
|
||||
const [error] = await safe(services.configureService(req.params.service, data, AuditSource.fromRequest(req)));
|
||||
|
||||
Reference in New Issue
Block a user