fix: HTTP 404 with uppercase username (#2045)

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
pull/2051/head^2
Louis Haftmann 2022-03-03 17:42:30 +01:00 committed by GitHub
parent 52e6711d51
commit 6e8fbc280f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
const ssr = await ssrInit(context); const ssr = await ssrInit(context);
const user = await prisma.user.findUnique({ const user = await prisma.user.findUnique({
where: { where: {
username: asStringOrThrow(context.query.user), username: asStringOrThrow(context.query.user).toLowerCase(),
}, },
select: { select: {
id: true, id: true,