From 479d468edce7d92890afc9e924b0896bab3ab5ef Mon Sep 17 00:00:00 2001
From: Elisa <20030784@studenti.uniupo.it>
Date: Wed, 14 Sep 2022 18:54:57 +0200
Subject: [PATCH] webapp

---
 webapp/public/js/authentication/app.js         | 5 +++--
 webapp/public/js/templates/domains-template.js | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/webapp/public/js/authentication/app.js b/webapp/public/js/authentication/app.js
index 076a566..8286eab 100644
--- a/webapp/public/js/authentication/app.js
+++ b/webapp/public/js/authentication/app.js
@@ -40,10 +40,11 @@ class App {
                 }
             });
         }
-        tr.querySelector('th > h4 > a').addEventListener('click', (event) => {
+        const a = tr.querySelector('th > h4 > a');
+        a.addEventListener('click', (event) => {
             event.preventDefault();
             sessionStorage.setItem('domain', domainObject.nome);
-            window.location.href = '/secured/home/';
+            window.location.href = a.href;
         });
     }
 
diff --git a/webapp/public/js/templates/domains-template.js b/webapp/public/js/templates/domains-template.js
index a9e2814..0f08233 100644
--- a/webapp/public/js/templates/domains-template.js
+++ b/webapp/public/js/templates/domains-template.js
@@ -1,6 +1,7 @@
 'use strict';
 
 function createRowDomain(domain) {
+    console.log(domain);
     return `
     <th scope="row">
         <h4 class="d-flex justify-content-center mt-2">
-- 
GitLab