diff --git a/CHANGELOG.md b/CHANGELOG.md index a9358ec..52e046c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Adjust session provider early return logic + ## [1.44.8] - 2024-10-02 ### Fixed diff --git a/node/resolvers/Routes/index.ts b/node/resolvers/Routes/index.ts index 6950e2a..ddc79ae 100644 --- a/node/resolvers/Routes/index.ts +++ b/node/resolvers/Routes/index.ts @@ -165,14 +165,14 @@ export const Routes = { const ignoreB2B = body?.public?.removeB2B?.value - if (ignoreB2B || !email) { + if (ignoreB2B) { ctx.response.body = response ctx.response.status = 200 return } - if (b2bImpersonate) { + if (email && b2bImpersonate) { try { user = (await getUser({ masterdata, @@ -212,6 +212,13 @@ export const Routes = { email = telemarketingEmail } + if (!email) { + ctx.response.body = response + ctx.response.status = 200 + + return + } + if (user === null) { user = (await getActiveUserByEmail(null, { email }, ctx).catch( (error) => {