From c923d21741cce6482eb477315526f0377c1ec04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Thu, 2 Nov 2023 14:22:06 +0000 Subject: [PATCH] fix: Convert emails to lowercase on request to match insert (#185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently E2E tests are failing as `team1-teamEditor-user@example.com` !== `team1-teameditor-user@example.com` 🤦 See https://github.com/theopensystemslab/planx-core/pull/175 --- src/requests/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requests/user.ts b/src/requests/user.ts index e6a33304..af7ec37a 100644 --- a/src/requests/user.ts +++ b/src/requests/user.ts @@ -141,7 +141,7 @@ async function getByEmail( } } `, - { email }, + { email: email.toLowerCase() }, ); return users?.[0] || null; }