31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
|
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";
|
||
|
import { Observable } from "rxjs/Observable";
|
||
|
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";
|
||
|
|
||
|
|
||
|
@Injectable()
|
||
|
export class LanguageService {
|
||
|
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 getLang(): Observable<Language[]> {
|
||
|
return this.http.get<Language[]>(this.actionUrl + "language", { headers: this.headers });
|
||
|
}
|
||
|
|
||
|
}
|