revert last commit

pull/116/head
Aevann 2023-02-08 18:50:02 +02:00
parent e975e46d31
commit cb62c760a8
1 changed files with 1 additions and 1 deletions

View File

@ -244,12 +244,12 @@ function submit(form) {
xhr.setRequestHeader('xhr', 'xhr');
xhr.onload = function() {
submitButton.disabled = false;
uploadfilelist.classList.add("d-none")
if (xhr.status >= 200 && xhr.status < 300) {
const post_id = JSON.parse(xhr.response)['post_id'];
location.href = "/post/" + post_id
} else {
submitButton.disabled = false;
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
try {
let data=JSON.parse(xhr.response);