import {sendAdminRequest} from "./network";

const seedButton = document.getElementById("seedButton");
seedButton.onclick = () => {
  sendAdminRequest("player", "post", {seed: true})
    .then(() => alert("The DB was seeded"))
    .catch(e => alert(e));
};

const resetButton = document.getElementById("reset-button");
resetButton.onclick = () => {
  sendAdminRequest("competition", "put", {running: true})
    .then(() => alert("The thread was reset"))
    .catch(e => alert(e));
};

@@ -227,37 +227,75 @@
 %0A    .catch(
-e
+()
  =%3E 
-alert(e)
+window.location.href = %22/web/adminLogin.html%22
 );%0A%7D;%0A%0Aconst

add redirect to adminLogin from admin page