From 6e8fbc280f01f8c4d7f6240f6abf88dd6d504854 Mon Sep 17 00:00:00 2001 From: Louis Haftmann <30736553+LouisHaftmann@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:42:30 +0100 Subject: [PATCH] fix: HTTP 404 with uppercase username (#2045) Co-authored-by: Peer Richelsen --- apps/web/pages/[user]/book.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/pages/[user]/book.tsx b/apps/web/pages/[user]/book.tsx index 67e9087a..f98b70af 100644 --- a/apps/web/pages/[user]/book.tsx +++ b/apps/web/pages/[user]/book.tsx @@ -26,7 +26,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { const ssr = await ssrInit(context); const user = await prisma.user.findUnique({ where: { - username: asStringOrThrow(context.query.user), + username: asStringOrThrow(context.query.user).toLowerCase(), }, select: { id: true,