removed healing function call in endpoint function

This commit is contained in:
Elias Papanikitas
2024-03-06 12:04:55 +01:00
parent adcb348917
commit 9c5a6ac4f6

6
app.js
View File

@@ -63,10 +63,9 @@ app.post("/sync-kbo-data/:kboStructuredIdUuid", async function (req, res) {
identifiers.kboStructuredId
);
}
await updateOvoNumberAndUri(ovoStructuredIdUri, wegwijsOvo);
}
await healAbbWithWegWijsData();
return throwServerError(API_STATUS_CODES.STATUS_200, res); // since we await, it should be 200
} catch (e) {
return throwServerError(API_STATUS_CODES.STATUS_500, res, e);
@@ -181,7 +180,6 @@ async function healAbbWithWegWijsData() {
}
if (!kboIdentifierOP?.kboOrg) {
console.log("creating new kboUnit");
await createKbo(
wegwijsKboOrg,
kboIdentifierOP.kboId,
@@ -251,6 +249,8 @@ function extractObjectData(object, field) {
return object?.findLast((fields) => {
return fields[field.NAME] === field.ID;
});
}
app.use(errorHandler);