10 lines
379 B
JavaScript
10 lines
379 B
JavaScript
import { api } from "./api.mjs";
|
|
|
|
export const patientsService = {
|
|
list: () => api.get("/rest/v1/patients"),
|
|
getById: (id) => api.get(`/rest/v1/patients?id=eq.${id}`),
|
|
create: (data) => api.post("/rest/v1/patients", data),
|
|
update: (id, data) => api.patch(`/rest/v1/patients?id=eq.${id}`, data),
|
|
delete: (id) => api.delete(`/rest/v1/patients?id=eq.${id}`),
|
|
};
|