From 5fac00f987320823d8ee37d04c74fcba3285d798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Sat, 18 Nov 2023 08:54:12 +0000 Subject: [PATCH] fix: Correct middleware order --- api.planx.uk/modules/pay/routes.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.planx.uk/modules/pay/routes.ts b/api.planx.uk/modules/pay/routes.ts index bfec90de2a..928f3b764e 100644 --- a/api.planx.uk/modules/pay/routes.ts +++ b/api.planx.uk/modules/pay/routes.ts @@ -36,9 +36,9 @@ router.get( router.post( "/payment-request/:paymentRequest/pay", - isTeamUsingGovPay, fetchPaymentRequestDetails, buildPaymentPayload, + isTeamUsingGovPay, validate(paymentRequestProxySchema), makeInviteToPayPaymentViaProxy, ); @@ -46,6 +46,7 @@ router.post( router.get( "/payment-request/:paymentRequest/payment/:paymentId", fetchPaymentRequestDetails, + isTeamUsingGovPay, validate(paymentProxySchema), fetchPaymentRequestViaProxy, );