externalldap: async'ify
and make the tests work again
This commit is contained in:
@@ -290,12 +290,11 @@ async function renewCerts(req, res, next) {
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
function syncExternalLdap(req, res, next) {
|
||||
externalLdap.startSyncer(function (error, taskId) {
|
||||
if (error) return next(new HttpError(500, error.message));
|
||||
async function syncExternalLdap(req, res, next) {
|
||||
const [error, taskId] = await safe(externalLdap.startSyncer());
|
||||
if (error) return next(new HttpError(500, error.message));
|
||||
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
});
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
function getServerIp(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user