1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

Getting the WebVault url before returning the send on cli's remove password command (#7382)

This commit is contained in:
aj-rosado
2024-01-02 10:54:32 +00:00
committed by GitHub
parent 9694939c4c
commit 1c876bea55
3 changed files with 10 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
import { SendService } from "@bitwarden/common/tools/send/services//send.service.abstraction";
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
@@ -8,6 +9,7 @@ export class SendRemovePasswordCommand {
constructor(
private sendService: SendService,
private sendApiService: SendApiService,
private environmentService: EnvironmentService,
) {}
async run(id: string) {
@@ -16,7 +18,8 @@ export class SendRemovePasswordCommand {
const updatedSend = await this.sendService.get(id);
const decSend = await updatedSend.decrypt();
const res = new SendResponse(decSend);
const webVaultUrl = this.environmentService.getWebVaultUrl();
const res = new SendResponse(decSend, webVaultUrl);
return Response.success(res);
} catch (e) {
return Response.error(e);