mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Fixed merge
This commit is contained in:
@@ -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';
|
||||
|
@@ -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<any> {
|
||||
@@ -42,7 +42,7 @@ export class AuthRequestService extends HALEndpointService {
|
||||
}
|
||||
|
||||
public postToEndpoint(method: string, body: any, options?: HttpOptions): Observable<any> {
|
||||
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<any> {
|
||||
return this.getEndpoint()
|
||||
return this.halService.getEndpoint(this.linkName)
|
||||
.filter((href: string) => isNotEmpty(href))
|
||||
.map((endpointURL) => this.getEndpointByMethod(endpointURL, method))
|
||||
.distinctUntilChanged()
|
||||
|
@@ -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);
|
||||
|
@@ -95,7 +95,7 @@ export class HostWindowService {
|
||||
|
||||
isMobileView(): Observable<boolean> {
|
||||
return this.getWidthObs()
|
||||
.map((width) => width < GridBreakpoint.MD)
|
||||
.map((width) => width < GridBreakpoint.MD_MIN)
|
||||
.distinctUntilChanged();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user