Skip to content

Commit

Permalink
Merge pull request #82 from osstotalsoft/externalTenantId-rename
Browse files Browse the repository at this point in the history
Fixing a rename gone wrong #81
  • Loading branch information
alexandra-c committed Jun 14, 2022
2 parents 5f1ae0c + f448292 commit c2697b0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { tenantFactory } = require("../../multiTenancy")

const tenantIdentification = () => async (ctx, next) => {
const externalTenantId = getTenantIdFromJwt(ctx)
const tenant = await tenantFactory.getTenantFromId(tenantId)
const tenant = await tenantFactory.getTenantFromId(externalTenantId)
if (tenant) {
ctx.tenantId = tenant?.id
ctx.externalTenantId = externalTenantId
Expand Down Expand Up @@ -43,4 +43,4 @@ const getTenantIdFromRefererHost = async ctx => {
return url.hostname
};

module.exports = tenantIdentification;
module.exports = tenantIdentification;

0 comments on commit c2697b0

Please sign in to comment.