summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-11-23 09:22:45 +0900
committerGitHub <noreply@github.com>2018-11-23 09:22:45 +0900
commit1858437eb12fa4186b7b2cd1f6d9523a3987152f (patch)
treeb06b83d415b0e991eededde9ab0e2ec09eeb08e4 /cli
parentUpdate @types/systeminformation requirement from 3.23.0 to 3.23.1 (#3370) (diff)
downloadsharkey-1858437eb12fa4186b7b2cd1f6d9523a3987152f.tar.gz
sharkey-1858437eb12fa4186b7b2cd1f6d9523a3987152f.tar.bz2
sharkey-1858437eb12fa4186b7b2cd1f6d9523a3987152f.zip
Delete reset-password.js
Diffstat (limited to 'cli')
-rw-r--r--cli/reset-password.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/cli/reset-password.js b/cli/reset-password.js
deleted file mode 100644
index d94c90f3d5..0000000000
--- a/cli/reset-password.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const mongo = require('mongodb');
-const bcrypt = require('bcryptjs');
-const User = require('../built/models/user').default;
-
-const args = process.argv.slice(2);
-
-const user = args[0];
-
-const q = user.startsWith('@') ? {
- username: user.split('@')[1],
- host: user.split('@')[2] || null
-} : { _id: new mongo.ObjectID(user) };
-
-console.log(`Resetting password for ${user}...`);
-
-const passwd = 'yo';
-
-// Generate hash of password
-const hash = bcrypt.hashSync(passwd);
-
-User.update(q, {
- $set: {
- password: hash
- }
-}).then(() => {
- console.log(`Password of ${user} is now '${passwd}'`);
-}, e => {
- console.error(e);
-});