return taskId for renewCerts

This commit is contained in:
Girish Ramakrishnan
2018-12-11 10:16:38 -08:00
parent c7da090882
commit 0fa353c2e2

View File

@@ -195,10 +195,10 @@ function getStatus(req, res, next) {
}
function renewCerts(req, res, next) {
cloudron.renewCerts({ domain: req.body.domain || null }, auditSource(req), function (error) {
cloudron.renewCerts({ domain: req.body.domain || null }, auditSource(req), function (error, taskId) {
if (error && error.reason === CloudronError.NOT_FOUND) return next(new HttpError(404, error.message));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(202, {}));
next(new HttpSuccess(202, { taskId }));
});
}