-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make requests case insensitive #79
Comments
This may be a tad harder than initially thought. While Prisma with PostgreSQL does support case insensitive queries, they have to be enabled on a per-query basis. await prisma.users.findFirst({
where: {
equals: name,
mode: "insensitive"
}
}) It does not look like the To properly support this we'll need to switch all of our instances of PostgreSQL requires this to be set per field you query for. |
@Fermain Any thoughts on this? I can't really find any downsides to switching to |
I'm not sure about the use case. If you're searching for a username shouldn't you be precise? |
Sure, but shouldn't also |
Or when logging in, and trying your email with a capital letter at the start |
If they are unique case insensitive, then yeah, the API should be insensitive too. Email is always insensitive so that makes sense. |
For example, making a request to get a profile with the name
Jan
will not return the profile of an existing user with namejan
. Seeing as emails and usernames are unique, we should make these case insensitive.The text was updated successfully, but these errors were encountered: