propose forcing lowercase usernames

This commit is contained in:
Thomas Camlong
2024-05-10 13:36:46 +02:00
parent 2434e2e758
commit 400fa3d480

View File

@@ -127,10 +127,12 @@ const createUser = async (
const salt = await createSalt();
const hashedPassword = await hashPassword(input.password, salt);
const username = input.username.toLowerCase();
const userId = createId();
await db.insert(schema.users).values({
id: userId,
name: input.username,
name: username,
password: hashedPassword,
salt,
});