diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-04-09 04:09:34 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-09 04:09:34 +0900 |
| commit | 5df708ac9f6c523b3035912403cef66cf788d62e (patch) | |
| tree | 4e973b48cadbbd2f469940299d3c6d4e1d77a4a5 /cli | |
| parent | Update migrate.ts (diff) | |
| download | sharkey-5df708ac9f6c523b3035912403cef66cf788d62e.tar.gz sharkey-5df708ac9f6c523b3035912403cef66cf788d62e.tar.bz2 sharkey-5df708ac9f6c523b3035912403cef66cf788d62e.zip | |
Delete mark-admin.js
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/mark-admin.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/cli/mark-admin.js b/cli/mark-admin.js deleted file mode 100644 index e10035fde9..0000000000 --- a/cli/mark-admin.js +++ /dev/null @@ -1,23 +0,0 @@ -const mongo = require('mongodb'); -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(`Mark as admin ${user}...`); - -User.update(q, { - $set: { - isAdmin: true - } -}).then(() => { - console.log(`Done ${user}`); -}, e => { - console.error(e); -}); |