From c4f9bc4b1ae01c0b14ccfd932b7f16c459746155 Mon Sep 17 00:00:00 2001 From: Joost Date: Tue, 20 Dec 2022 15:45:51 +0100 Subject: [PATCH] lint fixes --- src/app/core/data/eperson-registration.service.ts | 6 +++--- .../register-email-form/register-email-form.component.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/core/data/eperson-registration.service.ts b/src/app/core/data/eperson-registration.service.ts index e1bdde262a..24c2263fd1 100644 --- a/src/app/core/data/eperson-registration.service.ts +++ b/src/app/core/data/eperson-registration.service.ts @@ -12,7 +12,7 @@ import { GenericConstructor } from '../shared/generic-constructor'; import { RegistrationResponseParsingService } from './registration-response-parsing.service'; import { RemoteData } from './remote-data'; import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service'; -import {HttpParams} from "@angular/common/http"; +import {HttpParams} from '@angular/common/http'; @Injectable( { @@ -55,7 +55,7 @@ export class EpersonRegistrationService { * Register a new email address * @param email */ - registerEmail(email: string, type?:string): Observable> { + registerEmail(email: string, type?: string): Observable> { const registration = new Registration(); registration.email = email; @@ -63,7 +63,7 @@ export class EpersonRegistrationService { const href$ = this.getRegistrationEndpoint(); - let options = type? {params: new HttpParams({fromString:'type='+type})}: {} + const options = type ? {params: new HttpParams({fromString:'type=' + type})} : {}; href$.pipe( find((href: string) => hasValue(href)), diff --git a/src/app/register-email-form/register-email-form.component.ts b/src/app/register-email-form/register-email-form.component.ts index 5daaf1d41c..9e7b783544 100644 --- a/src/app/register-email-form/register-email-form.component.ts +++ b/src/app/register-email-form/register-email-form.component.ts @@ -64,9 +64,9 @@ export class RegisterEmailFormComponent implements OnInit { * Register an email address */ register() { - let typeMap = new Map([ - ["register-page.registration", "register"], - ["forgot-email.form", "forgot"] + const typeMap = new Map([ + ['register-page.registration', 'register'], + ['forgot-email.form', 'forgot'] ]); if (!this.form.invalid) { this.epersonRegistrationService.registerEmail(this.email.value, typeMap.get(this.MESSAGE_PREFIX)).subscribe((response: RemoteData) => {