From 53aebdf5858b079a74db2cbfad581280b5d89eda Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 6 Sep 2021 16:18:50 +0100 Subject: [PATCH] fix test failure --- packages/auth/src/middleware/tenancy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/auth/src/middleware/tenancy.js b/packages/auth/src/middleware/tenancy.js index 68d5051895..c8b24d12e0 100644 --- a/packages/auth/src/middleware/tenancy.js +++ b/packages/auth/src/middleware/tenancy.js @@ -5,13 +5,13 @@ const { buildMatcherRegex, matches } = require("./matchers") module.exports = ( allowQueryStringPatterns, noTenancyPatterns, - { noTenancyRequired } + opts = {} ) => { const allowQsOptions = buildMatcherRegex(allowQueryStringPatterns) const noTenancyOptions = buildMatcherRegex(noTenancyPatterns) return ContextFactory.getMiddleware(ctx => { - const allowNoTenant = noTenancyRequired || !!matches(ctx, noTenancyOptions) + const allowNoTenant = opts.noTenancyRequired || !!matches(ctx, noTenancyOptions) const allowQs = !!matches(ctx, allowQsOptions) setTenantId(ctx, { allowQs, allowNoTenant }) })