import { Injectable } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { environment } from 'environments/environment'; import { Observable } from 'rxjs'; import { HttpResponse, HttpClient } from '@angular/common/http'; import { BaseHttpService } from '../http/base-http.service'; @Injectable() export class UserGuideService { private userGuideUrl = `${environment.Server}userguide`; constructor( private translate: TranslateService, private http: HttpClient, private baseHttp: BaseHttpService ) {} public getUserGuide(): Observable> { return this.http.get(`${this.userGuideUrl}/current`, { responseType: 'blob', observe: 'response', headers: {'Content-type': 'text/html', 'Accept': 'text/html', 'Access-Control-Allow-Origin': environment.App, 'Access-Control-Allow-Credentials': 'true'} }); } public updateUserGuide(data: any): Observable { return this.http.post(`${this.userGuideUrl}/current`, data); } }