added jwt service. Currently it has some bugs and it is not very functional.

Also restructured the project a bit - created a service folder for the database script and the token script.
This commit is contained in:
2025-07-22 19:39:54 +02:00
parent c2a035ca34
commit b249c73aa4
6 changed files with 54 additions and 22 deletions

View File

@@ -34,6 +34,7 @@ const LoginCard: React.FC<LoginCardProps> = ({ onClose }) => {
.then(async (response) => {
if (response.ok) {
const data = await response.json();
Cookies.set("token", data.token, { expires: 7 });
onClose();
Cookies.set("name", data.user.first_name, { expires: 7 });
await fetch("http://localhost:5002/api/getAllUsers")