1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-20 19:34:03 +00:00

refactor(email-verification-feature-flag): [PM-7882] Email Verification - Removed ambiguous null value for params.

This commit is contained in:
Patrick Pimentel
2025-01-06 12:07:08 -05:00
parent 4659f9ab0c
commit d8029acad2
3 changed files with 4 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ import { ActivatedRoute, Params, Router } from "@angular/router";
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { ToastService } from "@bitwarden/components";
import { BaseAcceptComponent } from "../../common/base.accept.component";
@@ -20,14 +20,14 @@ export class AcceptOrganizationComponent extends BaseAcceptComponent {
constructor(
router: Router,
platformUtilsService: PlatformUtilsService,
i18nService: I18nService,
route: ActivatedRoute,
authService: AuthService,
toastService: ToastService,
private acceptOrganizationInviteService: AcceptOrganizationInviteService,
private logService: LogService,
) {
super(router, platformUtilsService, i18nService, route, authService, toastService);
super(router, i18nService, route, authService, toastService);
}
async authedHandler(qParams: Params): Promise<void> {

View File

@@ -19,14 +19,7 @@ export class OrganizationInvite {
return Object.assign(new OrganizationInvite(), json);
}
static fromParams(params: Params | null): OrganizationInvite | null {
// Conversation topic:
// What if the query parameters we passed in are null? How do we outwardly communicate
// that this happened?
if (params == null) {
return null;
}
static fromParams(params: Params): OrganizationInvite {
return Object.assign(new OrganizationInvite(), {
email: params.email,
initOrganization: params.initOrganization?.toLocaleLowerCase() === "true",

View File

@@ -6,7 +6,6 @@ import { first, switchMap, takeUntil } from "rxjs/operators";
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ToastService } from "@bitwarden/components";
@Directive()
@@ -24,7 +23,6 @@ export abstract class BaseAcceptComponent implements OnInit {
constructor(
protected router: Router,
protected platformUtilService: PlatformUtilsService,
protected i18nService: I18nService,
protected route: ActivatedRoute,
protected authService: AuthService,