From 5c66ddc44f281e8812e340a348202013b3f6cee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Fri, 26 Apr 2024 01:27:53 +0200 Subject: [PATCH] MEME --- assets/script.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/script.js b/assets/script.js index c516621..1e29cf3 100644 --- a/assets/script.js +++ b/assets/script.js @@ -573,6 +573,9 @@ function deleteFile(fileID) { let xhr = new XMLHttpRequest(); xhr.open('POST', '/upload', true); + xhr.onload = function () { + listFiles(); + }; xhr.send(formData); } @@ -641,6 +644,7 @@ async function deleteMeme(memeId) { xhr.onload = function () { const resp = JSON.parse(xhr.responseText); handleResponse(resp, "Meme bol zmazaný", "Nastala chyba pri mazaní meme-u"); + softReload(); }; xhr.send(formData); }