Revert "Release/2026 02 27 (pull request #3070)"

This commit is contained in:
Patrick Fic
2026-03-04 16:18:44 +00:00
parent 522f2b9e26
commit c9e41ba72a
204 changed files with 5497 additions and 7715 deletions

View File

@@ -86,9 +86,6 @@ async function FetchSubscriptions({ redisHelpers, socket, jobid, SubscriptionObj
logRequest: false
});
const SubscriptionMeta = subscriptions.data.subscriptions.find((s) => s.subscriptionId === SubscriptionID);
if (!SubscriptionMeta) {
throw new Error(`Subscription metadata not found for SubscriptionID: ${SubscriptionID}`);
}
if (setSessionTransactionData) {
await setSessionTransactionData(
socket.id,
@@ -105,15 +102,11 @@ async function FetchSubscriptions({ redisHelpers, socket, jobid, SubscriptionObj
error: error.message,
stack: error.stack
});
throw error;
}
}
async function GetDepartmentId({ apiName, debug = false, SubscriptionMeta, overrideDepartmentId }) {
if (!apiName) throw new Error("apiName not provided. Unable to get department without apiName.");
if (!SubscriptionMeta || !Array.isArray(SubscriptionMeta.apiDmsInfo)) {
throw new Error("Subscription metadata missing apiDmsInfo.");
}
if (debug) {
console.log("API Names & Departments ");
console.log("===========");
@@ -125,8 +118,9 @@ async function GetDepartmentId({ apiName, debug = false, SubscriptionMeta, overr
.find((info) => info.name === apiName)?.departments; //Departments are categorized by API name and have an array of departments.
if (overrideDepartmentId) {
return departmentIds && departmentIds.find((d) => d.id === overrideDepartmentId)?.id;
return departmentIds && departmentIds.find(d => d.id === overrideDepartmentId)?.id
} else {
return departmentIds && departmentIds[0] && departmentIds[0].id; //TODO: This makes the assumption that there is only 1 department.
}
}