From 8d6acf5ac65abc12b9cdfe24ab29e2527b88a9e4 Mon Sep 17 00:00:00 2001 From: xfarrow Date: Mon, 19 Feb 2024 16:02:30 +0100 Subject: [PATCH] update --- backend/apis/nodejs/api.js | 4 ++-- backend/apis/nodejs/{ => controllers}/api_controller.js | 2 ++ .../html/html/privacypolicy_and_tou/Termini-Di-Utilizzo.html | 2 +- frontend/html/html/privacypolicy_and_tou/Terms-Of-Use.html | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) rename backend/apis/nodejs/{ => controllers}/api_controller.js (99%) diff --git a/backend/apis/nodejs/api.js b/backend/apis/nodejs/api.js index 2ebd90e..ad631a6 100644 --- a/backend/apis/nodejs/api.js +++ b/backend/apis/nodejs/api.js @@ -15,7 +15,7 @@ const express = require('express'); const cors = require('cors'); const rateLimit = require('express-rate-limit'); -const apiController = require('./api_controller.js'); +const apiController = require('./controllers/api_controller.js'); require('dotenv').config(); // Application configuration @@ -34,8 +34,8 @@ publicRoutes.post('/login', apiController.login); const protectedRoutes = express.Router(); protectedRoutes.use(apiController.verifyToken); -protectedRoutes.get('/person/:id', apiController.getPerson); protectedRoutes.get('/person/myself', apiController.getMyself); +protectedRoutes.get('/person/:id', apiController.getPerson); protectedRoutes.put('/person/:id', apiController.updatePerson); protectedRoutes.delete('/person/delete', apiController.deletePerson); protectedRoutes.post('/organization/admin', apiController.addOrganizationAdmin); diff --git a/backend/apis/nodejs/api_controller.js b/backend/apis/nodejs/controllers/api_controller.js similarity index 99% rename from backend/apis/nodejs/api_controller.js rename to backend/apis/nodejs/controllers/api_controller.js index 18f28b9..e00b8df 100644 --- a/backend/apis/nodejs/api_controller.js +++ b/backend/apis/nodejs/controllers/api_controller.js @@ -173,6 +173,8 @@ async function getMyself(req, res){ .where({ id: req.jwt.person_id }) .first(); + console.log(req.jwt.person_id); + if(person){ delete person['password']; return res.status(200).send(person); diff --git a/frontend/html/html/privacypolicy_and_tou/Termini-Di-Utilizzo.html b/frontend/html/html/privacypolicy_and_tou/Termini-Di-Utilizzo.html index b62494c..01af80e 100644 --- a/frontend/html/html/privacypolicy_and_tou/Termini-Di-Utilizzo.html +++ b/frontend/html/html/privacypolicy_and_tou/Termini-Di-Utilizzo.html @@ -35,7 +35,7 @@ In nessun caso saremo responsabili per danni diretti, indiretti, punitivi, incid

7. Legge Applicabile

-Questi Termini saranno regolati e interpretati in conformità alle leggi [Nome del tuo Paese], senza considerare i suoi principi di conflitto di leggi. +Questi Termini saranno regolati e interpretati in conformità alle leggi della Repubblica Italiana.

8. Modifiche ai Termini

diff --git a/frontend/html/html/privacypolicy_and_tou/Terms-Of-Use.html b/frontend/html/html/privacypolicy_and_tou/Terms-Of-Use.html index 72fa40b..d8754f9 100644 --- a/frontend/html/html/privacypolicy_and_tou/Terms-Of-Use.html +++ b/frontend/html/html/privacypolicy_and_tou/Terms-Of-Use.html @@ -37,7 +37,7 @@ In no event shall we be liable for any direct, indirect, punitive, incidental, s

7. Governing Law

-These Terms shall be governed by and construed in accordance with the laws of [Your Country], without regard to its conflict of law provisions. +These Terms shall be governed by and construed in accordance with the laws of the Italian Republic.

8. Changes to Terms