2018-10-05 17:00:54 +02:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
import { HttpHeaders } from '@angular/common/http';
|
|
|
|
import { BaseHttpService } from '../../utilities/cite-http-service-module/base-http.service';
|
|
|
|
import { HostConfiguration } from '../../app.constants';
|
2018-10-12 17:17:31 +02:00
|
|
|
import { Observable } from 'rxjs';
|
2018-10-05 17:00:54 +02:00
|
|
|
import { Invitation } from '../../models/invitation/Invitation';
|
|
|
|
import { User } from '../../models/invitation/User';
|
|
|
|
import { RequestItem } from '../../models/criteria/RequestItem';
|
|
|
|
import { UserInvitationCriteria } from '../../models/criteria/invitation/UserInvitationCriteria';
|
|
|
|
import { Language } from '../../models/language/Language';
|
2018-03-28 15:24:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class LanguageService {
|
2018-10-05 17:00:54 +02:00
|
|
|
private actionUrl: string;
|
|
|
|
private headers: HttpHeaders;
|
2018-03-28 15:24:47 +02:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
constructor(private http: BaseHttpService) {
|
2018-03-28 15:24:47 +02:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
this.actionUrl = HostConfiguration.Server + 'common/';
|
2018-03-28 15:24:47 +02:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
this.headers = new HttpHeaders();
|
|
|
|
this.headers = this.headers.set('Content-Type', 'application/json');
|
|
|
|
this.headers = this.headers.set('Accept', 'application/json');
|
|
|
|
}
|
2018-03-28 15:24:47 +02:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
public getLang(): Observable<Language[]> {
|
|
|
|
return this.http.get<Language[]>(this.actionUrl + 'language', { headers: this.headers });
|
|
|
|
}
|
2018-03-28 15:24:47 +02:00
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
}
|