import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { TabDoenca } from 'src/app/models/tab-doenca/tab-doenca.model';

@Injectable({
  providedIn: 'root'
})
export class TabDoencaService {

  private readonly URL = 'https://3000-yasmimtcc-3egb2023tcche-jzxp8591avr.ws-us106.gitpod.io/'
  constructor(private readonly _http : HttpClient) { }

  buscarDoencas(): Observable<any> {
    return this._http.get(`${this.URL}doencasSP`)
  }

  buscarDoencaPorId(id: any): Observable<any>{
    return this._http.get(`${this.URL}doencasSP/${id}`)
  }
}
