From: Michal Date: Wed, 15 Aug 2018 10:14:06 +0000 (+0200) Subject: Replace "fuck" with "ajax_failure" X-Git-Url: https://rtime.felk.cvut.cz/gitweb/coffee/coffee-flask.git/commitdiff_plain/44e6bcb93a6d29870d553beb0bd6e3885637f222?ds=sidebyside Replace "fuck" with "ajax_failure" It makes the reason of the data structure clearer :-) --- diff --git a/templates/main.js b/templates/main.js index b55fbb5..7160868 100644 --- a/templates/main.js +++ b/templates/main.js @@ -74,7 +74,7 @@ function hiddenUpdateRemote(json) { addCoffee(flavor); } break; - case "fuck": + case "ajax_failure": ajax(msg.method, msg.route, msg.data, msg.id); break; } @@ -115,15 +115,15 @@ function ajax(method, route, data, id) { updateUI(); if (localStorage) { - var fuck = JSON.stringify({ - type: "fuck", + var ajax_failure = JSON.stringify({ + type: "ajax_failure", method: method, route: route, data: data, id: id }); let queue = JSON.parse(localStorage.getItem("offlineQueue")) || []; - queue.push({ time: Date.now(), data: fuck }); + queue.push({ time: Date.now(), data: ajax_failure }); try { localStorage.setItem("offlineQueue", JSON.stringify(queue)); }