diff options
Diffstat (limited to 'scripts/reset-password.ts')
-rwxr-xr-x | scripts/reset-password.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/reset-password.ts b/scripts/reset-password.ts index f0c06a7bf..a6863f807 100755 --- a/scripts/reset-password.ts +++ b/scripts/reset-password.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as program from 'commander' | 1 | import * as program from 'commander' |
2 | 2 | import { initDatabase } from '../server/initializers' | |
3 | import { database as db } from '../server/initializers/database' | 3 | import { UserModel } from '../server/models/account/user' |
4 | 4 | ||
5 | program | 5 | program |
6 | .option('-u, --user [user]', 'User') | 6 | .option('-u, --user [user]', 'User') |
@@ -11,9 +11,9 @@ if (program['user'] === undefined) { | |||
11 | process.exit(-1) | 11 | process.exit(-1) |
12 | } | 12 | } |
13 | 13 | ||
14 | db.init(true) | 14 | initDatabase(true) |
15 | .then(() => { | 15 | .then(() => { |
16 | return db.User.loadByUsername(program['user']) | 16 | return UserModel.loadByUsername(program['user']) |
17 | }) | 17 | }) |
18 | .then(user => { | 18 | .then(user => { |
19 | if (!user) { | 19 | if (!user) { |