Fixup the tests for wildcard cert

This commit is contained in:
Johannes Zellner
2015-10-28 16:00:51 +01:00
parent d9256f99af
commit 12351113a9
2 changed files with 29 additions and 24 deletions
+1
View File
@@ -119,6 +119,7 @@ function setCertificate(req, res, next) {
if (!req.body.key || typeof req.body.key !== 'string') return next(new HttpError(400, 'key must be a string'));
settings.setCertificate(req.body.cert, req.body.key, function (error) {
if (error && error.reason === SettingsError.INVALID_CERT) return next(new HttpError(400, 'cert not applicable'))
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(202, {}));