Files
dspace-angular/src/app/shared/testing/hal-endpoint-service.stub.ts
2022-04-21 14:08:01 -04:00

14 lines
355 B
TypeScript

import { of as observableOf } from 'rxjs';
import { hasValue } from '../empty.util';
export class HALEndpointServiceStub {
constructor(private url: string) {}
getEndpoint(path: string, startHref?: string) {
if (hasValue(startHref)) {
return observableOf(startHref + '/' + path);
}
return observableOf(this.url + '/' + path);
}
}