mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 13:33:03 +00:00
lint fixes
This commit is contained in:
@@ -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)),
|
||||
|
@@ -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>) => {
|
||||
|
Reference in New Issue
Block a user