mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
accept requestJson for create/edit as stdin
This commit is contained in:
@@ -161,22 +161,22 @@ export class Program {
|
||||
});
|
||||
|
||||
program
|
||||
.command('create <object> <encodedData>')
|
||||
.command('create <object> [encodedJson]')
|
||||
.description('Create an object.')
|
||||
.action(async (object, encodedData, cmd) => {
|
||||
.action(async (object, encodedJson, cmd) => {
|
||||
await this.exitIfLocked();
|
||||
const command = new CreateCommand(this.main.cipherService, this.main.folderService);
|
||||
const response = await command.run(object, encodedData, cmd);
|
||||
const response = await command.run(object, encodedJson, cmd);
|
||||
this.processResponse(response);
|
||||
});
|
||||
|
||||
program
|
||||
.command('edit <object> <id> <encodedData>')
|
||||
.command('edit <object> <id> [encodedJson]')
|
||||
.description('Edit an object.')
|
||||
.action(async (object, id, encodedData, cmd) => {
|
||||
.action(async (object, id, encodedJson, cmd) => {
|
||||
await this.exitIfLocked();
|
||||
const command = new EditCommand(this.main.cipherService, this.main.folderService);
|
||||
const response = await command.run(object, id, encodedData, cmd);
|
||||
const response = await command.run(object, id, encodedJson, cmd);
|
||||
this.processResponse(response);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user