import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { Wharf } from 'src/app/models/Wharf';
import { City } from 'src/app/models/city';

@Injectable({
  providedIn: 'root'
})
export class OverzichtWervenService {
  url = environment.url;

  constructor(private httpClient: HttpClient) { }

  getWharfs(): Observable<Wharf[]> {
    return this.httpClient.get<Wharf[]>(this.url + '/Wharf/getWharves');
  }

  getCities(): Observable<City[]> {
    return this.httpClient.get<City[]>(this.url + '/City/getCities');
  }

}
