From eebef2455f877b5dc86a63a781fd8f931d85b9a8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 23 Nov 2018 09:24:00 +0900 Subject: [PATCH] Delete suspend.js --- cli/suspend.js | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 cli/suspend.js diff --git a/cli/suspend.js b/cli/suspend.js deleted file mode 100644 index 877b37dbc..000000000 --- a/cli/suspend.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(`Suspending ${user}...`); - -User.update(q, { - $set: { - isSuspended: true - } -}).then(() => { - console.log(`Suspended ${user}`); -}, e => { - console.error(e); -});