cli: reset 2fa on admin reset (#2461)

reset 2fa on cli reset
This commit is contained in:
Bernd Storath
2026-02-06 12:28:13 +01:00
committed by GitHub
parent c0641889cf
commit c5de8f0f44
+3 -1
View File
@@ -18,7 +18,7 @@ const db = drizzle({ client, schema });
const dbAdminReset = defineCommand({
meta: {
name: 'db:admin:reset',
description: 'Reset the admin user',
description: 'Reset the admin user password and TOTP settings',
},
args: {
password: {
@@ -61,6 +61,8 @@ const dbAdminReset = defineCommand({
.update(schema.user)
.set({
password: hash,
totpVerified: false,
totpKey: null,
})
.where(eq(schema.user.id, 1));