mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
Removing hanging promises, and adding a guard to projects routing (#8891)
* Removing hanging promises, and adding a guard to projects routing * Additional logging * adding tests * Trying to get Jest tests working * coltons suggested changes
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
|
||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { DialogService } from "@bitwarden/components";
|
||||
|
||||
@@ -94,6 +95,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private i18nService: I18nService,
|
||||
private smOnboardingTasksService: SMOnboardingTasksService,
|
||||
private logService: LogService,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -297,12 +299,13 @@ export class OverviewComponent implements OnInit, OnDestroy {
|
||||
SecretsListComponent.copySecretName(name, this.platformUtilsService, this.i18nService);
|
||||
}
|
||||
|
||||
copySecretValue(id: string) {
|
||||
SecretsListComponent.copySecretValue(
|
||||
async copySecretValue(id: string) {
|
||||
await SecretsListComponent.copySecretValue(
|
||||
id,
|
||||
this.platformUtilsService,
|
||||
this.i18nService,
|
||||
this.secretService,
|
||||
this.logService,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -310,11 +313,9 @@ export class OverviewComponent implements OnInit, OnDestroy {
|
||||
SecretsListComponent.copySecretUuid(id, this.platformUtilsService, this.i18nService);
|
||||
}
|
||||
|
||||
protected hideOnboarding() {
|
||||
protected async hideOnboarding() {
|
||||
this.showOnboarding = false;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.saveCompletedTasks(this.organizationId, {
|
||||
await this.saveCompletedTasks(this.organizationId, {
|
||||
importSecrets: true,
|
||||
createSecret: true,
|
||||
createProject: true,
|
||||
|
||||
Reference in New Issue
Block a user