Skip to content

Commit

Permalink
Revert "Revert "fix: 🐛 add in auth_methods, keep schema as notNull()""
Browse files Browse the repository at this point in the history
This reverts commit d8fb1d7.
  • Loading branch information
KevinWu098 committed Apr 22, 2024
1 parent d8fb1d7 commit 45d0aec
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"daisyui": "^4.6.2",
"devmoji": "2.3.0",
"dotenv": "^16.4.5",
"drizzle-kit": "0.20.14",
"drizzle-kit": "0.20.17",
"eslint": "8.54.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.29.0",
Expand Down
39 changes: 28 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lib/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const users = zotMeet.table("users", {
email: text("email").unique().notNull(),
password: text("password"),
created_at: timestamp("created_at"),
authMethods: json("auth_methods").$type<string[]>(),
authMethods: json("auth_methods").$type<string[]>().notNull(),
});

// Guests are Members who do not have an account and are bound to one specific meeting.
Expand Down
2 changes: 1 addition & 1 deletion src/routes/auth/register/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function register({ request, cookies }: { request: Request; cookies: Cooki
displayName: form.data.displayName,
email: form.data.email,
password: hashedPassword,
// authMethods: ["email"],
authMethods: ["email"],
});

await createAndSetSession(lucia, userId, cookies);
Expand Down

0 comments on commit 45d0aec

Please sign in to comment.