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

sub out create command

This commit is contained in:
Kyle Spearrin
2018-05-14 21:19:49 -04:00
parent 428f46af06
commit b5507813ab
4 changed files with 74 additions and 1 deletions

View File

@@ -9,10 +9,11 @@ import { SyncCommand } from './commands/sync.command';
import { Main } from './main';
import { Response } from './models/response';
import { CreateCommand } from './commands/create.command';
import { EncodeCommand } from './commands/encode.command';
import { ListResponse } from './models/response/listResponse';
import { StringResponse } from './models/response/stringResponse';
import { TemplateResponse } from './models/response/templateResponse';
import { EncodeCommand } from './commands/encode.command';
export class Program {
constructor(private main: Main) { }
@@ -70,6 +71,15 @@ export class Program {
this.processResponse(response);
});
program
.command('create <object> <encodedData>')
.description('Create an object.')
.action(async (object, encodedData, cmd) => {
const command = new CreateCommand(this.main.cipherService, this.main.folderService);
const response = await command.run(object, encodedData, cmd);
this.processResponse(response);
});
program
.command('edit <object> <id>')
.description('Edit an object.')