refactor: update

This commit is contained in:
Mauricio Siu
2025-02-13 02:36:08 -06:00
parent 7c0d223e17
commit bc901bcb25
5 changed files with 17 additions and 13 deletions

View File

@@ -72,7 +72,7 @@ inserted_accounts AS (
SELECT
gen_random_uuid(),
gen_random_uuid(),
'credentials',
'credential',
a."adminId",
auth.password,
COALESCE(auth."is2FAEnabled", false),
@@ -166,7 +166,7 @@ inserted_member_accounts AS (
SELECT
gen_random_uuid(),
gen_random_uuid(),
'credentials',
'credential',
u."userId",
auth.password,
COALESCE(auth."is2FAEnabled", false),

View File

@@ -54,7 +54,7 @@ await db
.then((user) => user[0]);
await db.insert(schema.account).values({
providerId: "credentials",
providerId: "credential",
userId: user?.id || "",
password: admin.auth.password,
is2FAEnabled: admin.auth.is2FAEnabled || false,
@@ -101,7 +101,7 @@ await db
.then((userTemp) => userTemp[0]);
await db.insert(schema.account).values({
providerId: "credentials",
providerId: "credential",
userId: member?.userId || "",
password: member.auth.password,
is2FAEnabled: member.auth.is2FAEnabled || false,

View File

@@ -69,8 +69,8 @@ export default function Home({ IS_CLOUD }: Props) {
const router = useRouter();
const form = useForm<Login>({
defaultValues: {
email: "user5@yopmail.com",
password: "Password1234",
email: "",
password: "",
},
resolver: zodResolver(loginSchema),
});