diff --git a/frontend/src/routes/(app)/dashboard/settings/security/+page.server.ts b/frontend/src/routes/(app)/dashboard/settings/security/+page.server.ts index bc648f8..f505b05 100644 --- a/frontend/src/routes/(app)/dashboard/settings/security/+page.server.ts +++ b/frontend/src/routes/(app)/dashboard/settings/security/+page.server.ts @@ -34,6 +34,14 @@ export const actions: Actions = { const userId = event.locals.user.id + if (event.locals.user.googleId) { + return setError( + form, + 'old_password', + 'Unable to set a password if using google login', + ) + } + const userData = await db.query.user.findFirst({ where: (user, { eq }) => eq(user.id, userId), }) diff --git a/frontend/src/routes/(app)/dashboard/settings/security/+page.svelte b/frontend/src/routes/(app)/dashboard/settings/security/+page.svelte index 2e65bef..6dbd725 100644 --- a/frontend/src/routes/(app)/dashboard/settings/security/+page.svelte +++ b/frontend/src/routes/(app)/dashboard/settings/security/+page.svelte @@ -62,7 +62,7 @@ method="POST" use:enhance class="flex flex-col gap-6" - action="?/update"> + action="?/change_password"> Old Password