Kész(?????)

This commit is contained in:
Sándor Máté Magony
2025-05-12 14:44:52 +02:00
parent edcfe3cf55
commit 8288e5d345
3 changed files with 18 additions and 6 deletions

View File

@@ -25,11 +25,13 @@ export default function Csempe() {
}, []);
function mosdoTorles(mosdoId){
const token = localStorage.getItem("token");
fetch("http://localhost:8000/api/mosdotorles/" + mosdoId, {
method: "DELETE",
header: {
headers: {
"Accept" : "application/json",
"Content-Type" : "application/json"
"Content-Type" : "application/json",
"Authorization": `Bearer ${token}`
}
})
.then(response => {

View File

@@ -37,14 +37,17 @@ export default function HozzaadForm() {
ar,
nyitva,
utvonal,
koordinatak,
felhasznalo_id: null
koordinatak
};
try {
const token = localStorage.getItem("token");
const response = await fetch("http://localhost:8000/api/hozzaadas", {
method: "POST",
headers: { "Content-Type": "application/json" },
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${token}`
},
body: JSON.stringify(wcInfo)
});