Nouvelle interface

This commit is contained in:
2023-06-19 17:38:49 +02:00
parent 97c2175e7b
commit ebbd1de1eb
10 changed files with 162 additions and 28 deletions

17
src/services/Api.js Normal file
View File

@@ -0,0 +1,17 @@
export default {
async call(controller, method) {
const apiUrl = '/App/api.php?prj=pharmamp&controller='+controller+'&method='+method
if (import.meta.env.DEV) {
console.log(apiUrl)
}
const response = await fetch(apiUrl)
if (import.meta.env.DEV) {
console.log(response.clone().text())
}
return response.json();
}
}