aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Angular/src/app/services/language.service.ts
blob: 8613a6586f84102ae1fadf3c82fc1ec8fb74bfb0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Guid} from 'guid-typescript';
import {Observable} from 'rxjs';
import {AppConstants} from '../app-constants.module';

@Injectable({
  providedIn: 'root'
})
export class LanguageService {
  constructor(private http: HttpClient) { }

  getLanguageRequest(langId: Guid): Observable<object> {
    const options = {
      params: new HttpParams().set('Id', langId.toString()),
    };
    return this.http.get(AppConstants.API_LANGUAGE_URL, options);
  }
}