Return http responses for ajax requests
This commit is contained in:
@ -301,7 +301,10 @@ let BookWyrm = new class {
|
||||
ajaxPost(form) {
|
||||
return fetch(form.action, {
|
||||
method : "POST",
|
||||
body: new FormData(form)
|
||||
body: new FormData(form),
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user