mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[PS-1841] Fix org-* commands for CLI (#4013)
* Add getFromState method * Added a method for CLI to get an org from state * Converted all CLI calls to `.get()` * Used `.getFromState` instead of `.get` * Deprecate getFromState method
This commit is contained in:
@@ -163,7 +163,7 @@ export class ListCommand {
|
||||
if (!Utils.isGuid(options.organizationId)) {
|
||||
return Response.badRequest("`" + options.organizationId + "` is not a GUID.");
|
||||
}
|
||||
const organization = await this.organizationService.get(options.organizationId);
|
||||
const organization = await this.organizationService.getFromState(options.organizationId);
|
||||
if (organization == null) {
|
||||
return Response.error("Organization not found.");
|
||||
}
|
||||
@@ -196,7 +196,7 @@ export class ListCommand {
|
||||
if (!Utils.isGuid(options.organizationId)) {
|
||||
return Response.badRequest("`" + options.organizationId + "` is not a GUID.");
|
||||
}
|
||||
const organization = await this.organizationService.get(options.organizationId);
|
||||
const organization = await this.organizationService.getFromState(options.organizationId);
|
||||
if (organization == null) {
|
||||
return Response.error("Organization not found.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user