repair: take optional docker image for re-configure

This commit is contained in:
Girish Ramakrishnan
2020-02-11 21:05:01 -08:00
parent 4b93b31c3d
commit f80f40cbcd
2 changed files with 10 additions and 1 deletions

View File

@@ -365,7 +365,11 @@ function repairApp(req, res, next) {
const data = req.body;
if ('manifest' in data) {
if (!data.manifest || typeof data.manifest !== 'object') return next(new HttpError(400, 'backupId must be an object'));
if (!data.manifest || typeof data.manifest !== 'object') return next(new HttpError(400, 'manifest must be an object'));
}
if ('dockerImage' in data) {
if (!data.dockerImage || typeof data.dockerImage !== 'string') return next(new HttpError(400, 'dockerImage must be a string'));
}
apps.repair(req.params.id, data, auditSource.fromRequest(req), function (error, result) {