mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53: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 { RegistrationResponseParsingService } from './registration-response-parsing.service';
|
||||||
import { RemoteData } from './remote-data';
|
import { RemoteData } from './remote-data';
|
||||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
import {HttpParams} from "@angular/common/http";
|
import {HttpParams} from '@angular/common/http';
|
||||||
|
|
||||||
@Injectable(
|
@Injectable(
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,7 @@ export class EpersonRegistrationService {
|
|||||||
* Register a new email address
|
* Register a new email address
|
||||||
* @param email
|
* @param email
|
||||||
*/
|
*/
|
||||||
registerEmail(email: string, type?:string): Observable<RemoteData<Registration>> {
|
registerEmail(email: string, type?: string): Observable<RemoteData<Registration>> {
|
||||||
const registration = new Registration();
|
const registration = new Registration();
|
||||||
registration.email = email;
|
registration.email = email;
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ export class EpersonRegistrationService {
|
|||||||
|
|
||||||
const href$ = this.getRegistrationEndpoint();
|
const href$ = this.getRegistrationEndpoint();
|
||||||
|
|
||||||
let options = type? {params: new HttpParams({fromString:'type='+type})}: {}
|
const options = type ? {params: new HttpParams({fromString:'type=' + type})} : {};
|
||||||
|
|
||||||
href$.pipe(
|
href$.pipe(
|
||||||
find((href: string) => hasValue(href)),
|
find((href: string) => hasValue(href)),
|
||||||
|
@@ -64,9 +64,9 @@ export class RegisterEmailFormComponent implements OnInit {
|
|||||||
* Register an email address
|
* Register an email address
|
||||||
*/
|
*/
|
||||||
register() {
|
register() {
|
||||||
let typeMap = new Map<string, string>([
|
const typeMap = new Map<string, string>([
|
||||||
["register-page.registration", "register"],
|
['register-page.registration', 'register'],
|
||||||
["forgot-email.form", "forgot"]
|
['forgot-email.form', 'forgot']
|
||||||
]);
|
]);
|
||||||
if (!this.form.invalid) {
|
if (!this.form.invalid) {
|
||||||
this.epersonRegistrationService.registerEmail(this.email.value, typeMap.get(this.MESSAGE_PREFIX)).subscribe((response: RemoteData<Registration>) => {
|
this.epersonRegistrationService.registerEmail(this.email.value, typeMap.get(this.MESSAGE_PREFIX)).subscribe((response: RemoteData<Registration>) => {
|
||||||
|
Reference in New Issue
Block a user