Explorar o código

fix: case-insensitive matching user email now

poeti8 %!s(int64=6) %!d(string=hai) anos
pai
achega
24415ff2e3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/db/user.ts

+ 1 - 1
server/db/user.ts

@@ -29,7 +29,7 @@ export const getUser = async (emailOrKey = ""): Promise<User> => {
       "domains.homepage as homepage",
       "domains.address as domain"
     )
-    .where({ email: emailOrKey.toLowerCase() })
+    .where("email", "ILIKE", emailOrKey)
     .orWhere({ apikey: emailOrKey })
     .leftJoin("domains", "users.id", "domains.user_id")
     .first();