update system config url and http options

This commit is contained in:
Jesse Lucas 2020-03-15 12:42:55 -04:00
parent 838b2a6a34
commit fb4c7d288c
1 changed files with 4 additions and 4 deletions

View File

@ -20,16 +20,16 @@ export class SystemConfigService {
private devices: Device[];
private foldersSubject: Subject<Folder[]> = new Subject();
private devicesSubject: Subject<Device[]> = new Subject();
private systemConfigUrl = environment.production ? apiURL + '/rest/system/config' : 'api/config';
private systemConfigUrl = environment.production ? apiURL + 'rest/system/config' : 'api/config';
private httpOptions;
constructor(private http: HttpClient, private cookieService: CookieService) { }
ngOnInit(): void {
constructor(private http: HttpClient, private cookieService: CookieService) {
this.httpOptions = { headers: new HttpHeaders(this.cookieService.getCSRFHeader()) };
}
ngOnInit(): void { }
getSystemConfig(): Observable<any> {
return this.http
.get(this.systemConfigUrl, this.httpOptions)