aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/reset-password.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 17:53:50 +0100
committerChocobozzz <me@florianbigard.com>2017-12-13 16:50:33 +0100
commit3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch)
treee5ca358287fca6ecacce83defcf23af1e8e9f419 /scripts/reset-password.ts
parentc893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff)
downloadPeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst
PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip
Move models to typescript-sequelize
Diffstat (limited to 'scripts/reset-password.ts')
-rwxr-xr-xscripts/reset-password.ts8
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 @@
1import * as program from 'commander' 1import * as program from 'commander'
2 2import { initDatabase } from '../server/initializers'
3import { database as db } from '../server/initializers/database' 3import { UserModel } from '../server/models/account/user'
4 4
5program 5program
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
14db.init(true) 14initDatabase(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) {