slight fixes to register logic

This commit is contained in:
DecDuck
2024-10-31 20:28:29 +11:00
parent 88c95d6bf7
commit 583301ff40

View File

@ -47,9 +47,8 @@ export default defineEventHandler(async (h3) => {
mailRegex.test(e)
);
const password = body.password;
const displayName = body.displayName ?? username;
const displayName = body.displayName || username;
console.log(username, email, password.length, displayName);
if (username === undefined)
throw createError({
statusCode: 400,