extract into service

This commit is contained in:
counterweight 2025-05-26 00:30:14 +02:00
parent 71de2807f4
commit 1603f29533
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 27 additions and 16 deletions

View file

@ -0,0 +1,10 @@
import axios from "axios";
const getPersons = () => {
return axios.get("http://localhost:3001/persons");
};
const addPerson = (personData) => {
return axios.post("http://localhost:3001/persons", personData);
};
export default { getPersons, addPerson };