Add authentication once again
This commit is contained in:
@@ -105,13 +105,16 @@
|
||||
token: token
|
||||
};
|
||||
|
||||
let creds = JSON.parse(localStorage.getItem("creds"));
|
||||
|
||||
await fetch("/payment", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(dataToken)
|
||||
})
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Basic ${creds.username}:${creds.password}`
|
||||
},
|
||||
body: JSON.stringify(dataToken)
|
||||
})
|
||||
.then(response => {
|
||||
if (response.ok) {
|
||||
document.getElementById("paymentAccepted").style.display = 'block';
|
||||
|
||||
Reference in New Issue
Block a user