Bernd Storath
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
1 deletions
-
src/cli/index.ts
|
|
@ -18,7 +18,7 @@ const db = drizzle({ client, schema }); |
|
|
const dbAdminReset = defineCommand({ |
|
|
const dbAdminReset = defineCommand({ |
|
|
meta: { |
|
|
meta: { |
|
|
name: 'db:admin:reset', |
|
|
name: 'db:admin:reset', |
|
|
description: 'Reset the admin user', |
|
|
description: 'Reset the admin user password and TOTP settings', |
|
|
}, |
|
|
}, |
|
|
args: { |
|
|
args: { |
|
|
password: { |
|
|
password: { |
|
|
@ -61,6 +61,8 @@ const dbAdminReset = defineCommand({ |
|
|
.update(schema.user) |
|
|
.update(schema.user) |
|
|
.set({ |
|
|
.set({ |
|
|
password: hash, |
|
|
password: hash, |
|
|
|
|
|
totpVerified: false, |
|
|
|
|
|
totpKey: null, |
|
|
}) |
|
|
}) |
|
|
.where(eq(schema.user.id, 1)); |
|
|
.where(eq(schema.user.id, 1)); |
|
|
|
|
|
|
|
|
|