-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathremove.js
39 lines (31 loc) · 1.02 KB
/
remove.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
const BoxCommand = require('../../../box-command');
class UsersDeleteEmailAliasCommand extends BoxCommand {
async run() {
const { flags, args } = this.parse(UsersDeleteEmailAliasCommand);
await this.client.users.removeEmailAlias(args.userID, args.aliasID);
this.info(`Removed alias ${args.aliasID} from user ${args.userID}`);
}
}
UsersDeleteEmailAliasCommand.aliases = [ 'users:delete-email-alias' ];
UsersDeleteEmailAliasCommand.description = 'Delete an email alias from a user';
UsersDeleteEmailAliasCommand.examples = ['box users:email-aliases:remove 33333 12345'];
UsersDeleteEmailAliasCommand._endpoint = 'delete_users_id_email_aliases_id';
UsersDeleteEmailAliasCommand.flags = {
...BoxCommand.flags
};
UsersDeleteEmailAliasCommand.args = [
{
name: 'userID',
required: true,
hidden: false,
description: 'User ID to get email aliases'
},
{
name: 'aliasID',
required: true,
hidden: false,
description: 'The ID of the email alias to delete'
}
];
module.exports = UsersDeleteEmailAliasCommand;