Fix bug CSRF token!

This commit is contained in:
Reckless_Satoshi 2022-01-04 16:23:52 -08:00
parent 9ade961e0f
commit 369d9e52a7
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -73,7 +73,7 @@ export default class OrderPage extends Component {
console.log(this.state)
const requestOptions = {
method: 'POST',
headers: {'Content-Type':'application/json', 'X-CSRFToken': csrftoken},
headers: {'Content-Type':'application/json', 'X-CSRFToken': getCookie('csrftoken')},
body: JSON.stringify({}),
};
fetch('/api/order/' + '?order_id=' + this.orderId, requestOptions)