refactor mux path routes

legend has it that if you refactor your code enough times, one day you
will finally be happy
This commit is contained in:
ari melody 2025-11-07 17:48:06 +00:00
parent 82fd17c836
commit 21912d4ec2
Signed by: ari
GPG key ID: CF99829C92678188
17 changed files with 102 additions and 469 deletions

View file

@ -18,7 +18,7 @@ document.addEventListener("readystatechange", () => {
}).then(res => {
res.text().then(text => {
if (res.ok) {
location = "/admin/artists/" + id;
location = "/admin/music/artists/" + id;
} else {
alert(text);
console.error(text);

View file

@ -10,7 +10,7 @@ document.addEventListener('readystatechange', () => {
headers: { "Content-Type": "application/json" },
body: JSON.stringify({id})
}).then(res => {
if (res.ok) location = "/admin/releases/" + id;
if (res.ok) location = "/admin/music/releases/" + id;
else {
res.text().then(err => {
alert(err);

View file

@ -11,7 +11,7 @@ if (newTrackBtn) newTrackBtn.addEventListener("click", event => {
}).then(res => {
res.text().then(text => {
if (res.ok) {
location = "/admin/tracks/" + text;
location = "/admin/music/tracks/" + text;
} else {
alert(text);
console.error(text);