AG
Size: a a a
AG
НХ
НХ
НХ
НХ
AG
AG
НХ
СЧ
AG
СЧ
СЧ
СЧ
НХ
СЧ
СЧ
AG
fetch
он точно асинкfunction send_patch(url) {
return fetch(url,{
method: "PATCH",
credentials: "include",
cache: "no-cache",
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': getCookie('csrftoken'),
},
})
.then(response => response.json());
}
send_patch(url)
.then(response => {
if (response.message === "success") {
button.parentElement.innerHTML = response.technic;
} else {
console.error("The technician is not attached.")
}
})
.catch(error => console.error(error));
НХ
T