import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ReferentialData } from '../entities/ReferentialData';

@Injectable({
  providedIn: 'root'
})
export class ReferentialDataService {
  constructor(
    private _httpClient: HttpClient
  ) {}

  getServiceTypes(): Promise<ReferentialData[]> {
    return this._httpClient.get<ReferentialData[]>('/api/referentialData/serviceTypes').toPromise();
  }
}
