This commit is contained in:
peintnermax
2024-03-28 09:43:33 +01:00
parent c23865e884
commit 4c18fb3af7

View File

@@ -156,13 +156,15 @@ export async function getSessionCookieByLoginName(
if (stringifiedCookie?.value) { if (stringifiedCookie?.value) {
const sessions: SessionCookie[] = JSON.parse(stringifiedCookie?.value); const sessions: SessionCookie[] = JSON.parse(stringifiedCookie?.value);
console.log("getSessionCookieByLoginName", loginName, organization);
const found = sessions.find((s) => const found = sessions.find((s) =>
s.loginName === loginName && organization s.loginName === loginName && organization
? s.organization === organization ? s.organization === organization
: true : true
); );
if (found) { if (found) {
console.log("getSessionCookieByLoginName found", found);
return found; return found;
} else { } else {
return Promise.reject("no cookie found with loginName: " + loginName); return Promise.reject("no cookie found with loginName: " + loginName);