mirror of
https://github.com/beilunyang/moemail.git
synced 2026-06-02 22:20:14 +08:00
feat: Email addresses are not case sensitive
This commit is contained in:
@@ -57,7 +57,7 @@ export async function POST(request: Request) {
|
||||
|
||||
const address = `${name || nanoid(8)}@${domain}`
|
||||
const existingEmail = await db.query.emails.findFirst({
|
||||
where: eq(emails.address, address)
|
||||
where: eq(sql`LOWER(${emails.address})`, address.toLowerCase())
|
||||
})
|
||||
|
||||
if (existingEmail) {
|
||||
|
||||
Reference in New Issue
Block a user