From ec1dc49ba1dddedf0e676ed571a152695979a46e Mon Sep 17 00:00:00 2001 From: Ro Date: Fri, 4 Nov 2022 12:52:19 -0700 Subject: [PATCH] Login Hotfix The script that handles logggin in and the form for getting that information were both posting the info which would result in an intemittent uncaught error. An attribute was added to the form so it does not submit at the same time the JS sends a request. A minor bug but it was annoying. --- brain/controller/APIControl.php | 3 --- brain/views/dash/forms/login.twig | 4 ++-- public/assets/scripts/Start.js | 1 - src/com/Base.js | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/brain/controller/APIControl.php b/brain/controller/APIControl.php index c9d253a..6f41555 100644 --- a/brain/controller/APIControl.php +++ b/brain/controller/APIControl.php @@ -225,9 +225,6 @@ class APIControl ]; break; } - - var_dump($result); - $response->getBody()->write(json_encode($result)); return $response->withHeader('Content-Type', 'application/json'); } diff --git a/brain/views/dash/forms/login.twig b/brain/views/dash/forms/login.twig index ad86a3f..5c2b285 100644 --- a/brain/views/dash/forms/login.twig +++ b/brain/views/dash/forms/login.twig @@ -2,10 +2,10 @@
-
+ - ? diff --git a/public/assets/scripts/Start.js b/public/assets/scripts/Start.js index 17b9d3b..ea79522 100644 --- a/public/assets/scripts/Start.js +++ b/public/assets/scripts/Start.js @@ -557,7 +557,6 @@ class Base { let self = this; e.preventDefault(); let authForm = data.formDataToJSON(document.getElementById("login")); - console.log("authform"); notify.alert("Looking, hold up", null); let api = new (0, _fipamoAdminAPIDefault.default)(); this.processing = true; diff --git a/src/com/Base.js b/src/com/Base.js index d74656a..55f3835 100644 --- a/src/com/Base.js +++ b/src/com/Base.js @@ -57,7 +57,6 @@ export default class Base { let self = this; e.preventDefault(); let authForm = data.formDataToJSON(document.getElementById('login')); - console.log('authform'); notify.alert('Looking, hold up', null); let api = new FipamoAdminAPI(); this.processing = true;