service: add memorySwap to configure route
This commit is contained in:
@@ -40,10 +40,11 @@ function configure(req, res, next) {
|
||||
assert.strictEqual(typeof req.params.service, 'string');
|
||||
|
||||
if (typeof req.body.memory !== 'number') return next(new HttpError(400, 'memory must be a number'));
|
||||
if (typeof req.body.memorySwap !== 'number') return next(new HttpError(400, 'memorySwap must be a number'));
|
||||
|
||||
const data = {
|
||||
memory: req.body.memory,
|
||||
memorySwap: req.body.memory * 2
|
||||
memorySwap: req.body.memorySwap
|
||||
};
|
||||
|
||||
addons.configureService(req.params.service, data, function (error) {
|
||||
|
||||
Reference in New Issue
Block a user