propose forcing lowercase usernames
This commit is contained in:
@@ -127,10 +127,12 @@ const createUser = async (
|
|||||||
const salt = await createSalt();
|
const salt = await createSalt();
|
||||||
const hashedPassword = await hashPassword(input.password, salt);
|
const hashedPassword = await hashPassword(input.password, salt);
|
||||||
|
|
||||||
|
const username = input.username.toLowerCase();
|
||||||
|
|
||||||
const userId = createId();
|
const userId = createId();
|
||||||
await db.insert(schema.users).values({
|
await db.insert(schema.users).values({
|
||||||
id: userId,
|
id: userId,
|
||||||
name: input.username,
|
name: username,
|
||||||
password: hashedPassword,
|
password: hashedPassword,
|
||||||
salt,
|
salt,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user