From c1149d045c37e38bda08958a782b3f36f0f6a918 Mon Sep 17 00:00:00 2001 From: gasoved Date: Thu, 7 Oct 2021 18:39:02 +0300 Subject: [PATCH] fix: better nomenclature --- src/cli/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/user.js b/src/cli/user.js index e02622e263..eda3502133 100644 --- a/src/cli/user.js +++ b/src/cli/user.js @@ -36,7 +36,7 @@ module.exports = () => { .description('Delete user(s) and/or their content') .arguments('') .addOption( - new Option('-c, --content [operation]', 'Delete user content ([purge]), leave content ([account]), or delete content only ([content])') + new Option('-t, --type [operation]', 'Delete user content ([purge]), leave content ([account]), or delete content only ([content])') .choices(['purge', 'account', 'content']).default('purge') ) .action((...args) => execute(userCommands.deleteUser, args)); @@ -234,7 +234,7 @@ ${pwGenerated ? ` Generated password: ${password}` : ''}`); } } - async function deleteUser(uids, { content }) { + async function deleteUser(uids, { type }) { uids = argParsers.intArrayParse(uids, 'uids'); const userExists = await user.exists(uids); @@ -245,7 +245,7 @@ ${pwGenerated ? ` Generated password: ${password}` : ''}`); await db.initSessionStore(); const adminUid = await getAdminUidOrFail(); - switch (content) { + switch (type) { case 'purge': await Promise.all(uids.map(uid => user.delete(adminUid, uid))); winston.info(`[userCmd/delete] User(s) with their content has been deleted.`);