import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Unidade } from 'src/app/models/unidSaude/unidade.model';
import { Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class UnidSaudeService {
  private url : string = "https://3000-yasmimtcc-3egb2023tcche-jzxp8591avr.ws-us106.gitpod.io"

  constructor(private readonly http: HttpClient) { }
  cadastrarUnid(unidade : Unidade) : Observable<any>
  {
  return this.http.post<any>(`${this.url}/unid-saude/`, unidade)
  }
  getOneUnid(id: string): Observable<any> {
    return this.http.get(`${this.url}/unid-saude/${id}`)
  }
}
