29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
|
import { ExternalSourcesConfiguration } from "../../models/external-sources/ExternalSourcesConfiguration";
|
||
|
import { BaseHttpService } from "../../utilities/cite-http-service-module/base-http.service";
|
||
|
import { HostConfiguration } from "../../app.constants";
|
||
|
import { HttpHeaders } from "@angular/common/http";
|
||
|
import { Injectable } from "@angular/core";
|
||
|
import { Observable } from "rxjs/Observable";
|
||
|
|
||
|
|
||
|
@Injectable()
|
||
|
export class ExternalSourcesConfigurationService {
|
||
|
|
||
|
private actionUrl: string;
|
||
|
private headers: HttpHeaders;
|
||
|
|
||
|
constructor(private http: BaseHttpService) {
|
||
|
|
||
|
this.actionUrl = HostConfiguration.Server + 'common/';
|
||
|
|
||
|
this.headers = new HttpHeaders();
|
||
|
this.headers = this.headers.set('Content-Type', 'application/json');
|
||
|
this.headers = this.headers.set('Accept', 'application/json');
|
||
|
}
|
||
|
|
||
|
public getExternalSourcesConfiguration(): Observable<ExternalSourcesConfiguration> {
|
||
|
return this.http.get<ExternalSourcesConfiguration>(this.actionUrl + "externalSourcesConfiguration", { headers: this.headers });
|
||
|
}
|
||
|
|
||
|
}
|