Files
swingmusic-webclient/public/workers/silence.js
mungai-njoroge 0bb7bf56d2 fix: 401 on web workers
+ rewrite the about component
+ fix: broken svg on folder item
+ show welcome back text
+ hide guest on accounts user list
+ remove settings link from nav profile icon
+ fix: broken svg on breadcrumb
+ fix: delete playlist icon showing on recently added playlist
+ fix: showing about in settings dialog
+ fix: broken svg on root dirs list
+ add is_admin getter to auth store
+ fix: playing from showing full path on now playing page
+ remove unused search folders component
2024-05-01 23:21:16 +03:00

20 lines
500 B
JavaScript

onmessage = async (e) => {
const { ending_file, starting_file } = e.data;
const is_dev = location.port === "5173";
const base_url = is_dev ? "http://localhost:1980" : location.origin;
const url = base_url + "/file/silence";
const res = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ ending_file, starting_file }),
credentials: "include"
});
const data = await res.json();
postMessage(data);
};