23 lines
816 B
TypeScript
23 lines
816 B
TypeScript
|
import { Injectable } from "@angular/core";
|
||
|
import { ConfigurationService } from "../configuration/configuration.service";
|
||
|
import { HttpClient, HttpResponse } from "@angular/common/http";
|
||
|
import { Observable } from "rxjs";
|
||
|
|
||
|
@Injectable()
|
||
|
export class AboutService {
|
||
|
private aboutUrl : string;
|
||
|
|
||
|
constructor(
|
||
|
private http: HttpClient,
|
||
|
private configurationService: ConfigurationService
|
||
|
) {
|
||
|
this.aboutUrl = `${configurationService.server}material/about`;
|
||
|
}
|
||
|
|
||
|
public getAbout(lang: string): Observable<HttpResponse<Blob>> {
|
||
|
return this.http.get(`${this.aboutUrl}/${lang}`, { responseType: 'blob', observe: 'response', headers: {'Content-type': 'text/html',
|
||
|
'Accept': 'text/html',
|
||
|
'Access-Control-Allow-Origin': this.configurationService.app,
|
||
|
'Access-Control-Allow-Credentials': 'true'} });
|
||
|
}
|
||
|
}
|