From 5bf9d4f7ab32dd209f0ca118ad9735cf8aeef981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Tue, 16 Apr 2024 10:23:24 +0100 Subject: [PATCH] fix: Type error in `GetPaymentRequestDetails` --- api.planx.uk/modules/pay/middleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.planx.uk/modules/pay/middleware.ts b/api.planx.uk/modules/pay/middleware.ts index f799b02429..3f687ba710 100644 --- a/api.planx.uk/modules/pay/middleware.ts +++ b/api.planx.uk/modules/pay/middleware.ts @@ -46,8 +46,8 @@ interface GetPaymentRequestDetails { slug: string; }; }; + passport: Passport; }; - passport: Passport; } | null; } @@ -99,7 +99,7 @@ export async function fetchPaymentRequestDetails( if (paymentAmount) req.params.paymentAmount = paymentAmount; res.locals.govPayMetadata = paymentRequest.govPayMetadata; - res.locals.passport = paymentRequest.passport; + res.locals.passport = paymentRequest.session.passport; next(); }