diff --git a/src/app/+search-page/search-filters/search-filter/search-filter.service.ts b/src/app/+search-page/search-filters/search-filter/search-filter.service.ts index 44d9c7e709..695e0204f2 100644 --- a/src/app/+search-page/search-filters/search-filter/search-filter.service.ts +++ b/src/app/+search-page/search-filters/search-filter/search-filter.service.ts @@ -14,7 +14,7 @@ import { import { hasValue, isEmpty, isNotEmpty, } from '../../../shared/empty.util'; import { SearchFilterConfig } from '../../search-service/search-filter-config.model'; import { SearchService } from '../../search-service/search.service'; -import { RouteService } from '../../../shared/route.service'; +import { RouteService } from '../../../shared/services/route.service'; import ObjectExpression from 'rollup/dist/typings/ast/nodes/ObjectExpression'; import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model'; import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model'; diff --git a/src/app/core/auth/auth-request.service.ts b/src/app/core/auth/auth-request.service.ts index 3255d62d21..a57ad48865 100644 --- a/src/app/core/auth/auth-request.service.ts +++ b/src/app/core/auth/auth-request.service.ts @@ -12,14 +12,14 @@ import { AuthStatusResponse, ErrorResponse, RestResponse } from '../cache/respon import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service'; @Injectable() -export class AuthRequestService extends HALEndpointService { +export class AuthRequestService { protected linkName = 'authn'; protected browseEndpoint = ''; - constructor(protected responseCache: ResponseCacheService, - protected requestService: RequestService, - @Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig) { - super(); + constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig, + protected halService: HALEndpointService, + protected responseCache: ResponseCacheService, + protected requestService: RequestService) { } protected fetchRequest(request: RestRequest): Observable { @@ -42,7 +42,7 @@ export class AuthRequestService extends HALEndpointService { } public postToEndpoint(method: string, body: any, options?: HttpOptions): Observable { - return this.getEndpoint() + return this.halService.getEndpoint(this.linkName) .filter((href: string) => isNotEmpty(href)) .map((endpointURL) => this.getEndpointByMethod(endpointURL, method)) .distinctUntilChanged() @@ -53,7 +53,7 @@ export class AuthRequestService extends HALEndpointService { } public getRequest(method: string, options?: HttpOptions): Observable { - return this.getEndpoint() + return this.halService.getEndpoint(this.linkName) .filter((href: string) => isNotEmpty(href)) .map((endpointURL) => this.getEndpointByMethod(endpointURL, method)) .distinctUntilChanged() diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index 751927f24e..fb83d491e6 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -277,7 +277,7 @@ export class AuthService { */ public storeToken(token: AuthTokenInfo) { // Add 1 day to the current date - const expireDate = Date.now() + (1000 * 60 * 60 * 24 * 1); + const expireDate = Date.now() + (1000 * 60 * 60 * 24); // Set the cookie expire date const expires = new Date(expireDate); @@ -371,8 +371,8 @@ export class AuthService { * Set redirect url */ setRedirectUrl(url: string) { - // Add 1 day to the current date - const expireDate = Date.now() + (1000 * 60 * 60 * 24 * 1); + // Add 1 hour to the current date + const expireDate = Date.now() + (1000 * 60 * 60); // Set the cookie expire date const expires = new Date(expireDate); diff --git a/src/app/shared/host-window.service.ts b/src/app/shared/host-window.service.ts index 8a9170a093..f32d7f2b7f 100644 --- a/src/app/shared/host-window.service.ts +++ b/src/app/shared/host-window.service.ts @@ -95,7 +95,7 @@ export class HostWindowService { isMobileView(): Observable { return this.getWidthObs() - .map((width) => width < GridBreakpoint.MD) + .map((width) => width < GridBreakpoint.MD_MIN) .distinctUntilChanged(); } }