1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

edit command

This commit is contained in:
Kyle Spearrin
2018-05-15 11:30:56 -04:00
parent 83e91b70ff
commit 1d3ed93bff
10 changed files with 80 additions and 19 deletions

View File

@@ -5,6 +5,7 @@ import { Main } from './bw';
import { CreateCommand } from './commands/create.command';
import { DeleteCommand } from './commands/delete.command';
import { EditCommand } from './commands/edit.command';
import { EncodeCommand } from './commands/encode.command';
import { GetCommand } from './commands/get.command';
import { ListCommand } from './commands/list.command';
@@ -84,10 +85,12 @@ export class Program {
});
program
.command('edit <object> <id>')
.command('edit <object> <id> <encodedData>')
.description('Edit an object.')
.action((object, id, cmd) => {
// TODO
.action(async (object, id, encodedData, cmd) => {
const command = new EditCommand(this.main.cipherService, this.main.folderService);
const response = await command.run(object, id, encodedData, cmd);
this.processResponse(response);
});
program