lint fixes

This commit is contained in:
Joost
2022-12-20 15:45:51 +01:00
parent 3f7bdb284f
commit c4f9bc4b1a
2 changed files with 6 additions and 6 deletions

View File

@@ -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<RemoteData<Registration>> {
registerEmail(email: string, type?: string): Observable<RemoteData<Registration>> {
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)),

View File

@@ -64,9 +64,9 @@ export class RegisterEmailFormComponent implements OnInit {
* Register an email address
*/
register() {
let typeMap = new Map<string, string>([
["register-page.registration", "register"],
["forgot-email.form", "forgot"]
const typeMap = new Map<string, string>([
['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<Registration>) => {