diff --git a/.gitignore b/.gitignore index f02a147..94d2e49 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /.idea /scrapers-config.json /scrapers.json +/.venv/ diff --git a/app/api/routes/auth_routes.py b/app/api/routes/auth_routes.py index 8808fb1..795a179 100644 --- a/app/api/routes/auth_routes.py +++ b/app/api/routes/auth_routes.py @@ -3,6 +3,7 @@ from flask import request +from app.models.Student import Student from app.services.student_service import StudentService from app.tools.jwt_engine import generate_jwt from app.tools.password_tools import check_password @@ -40,7 +41,7 @@ def validate_email_login(): if not check_password(password, student.password_hash): return {"error": "Invalid email or password"}, 400 - token = generate_jwt(student) + token = StudentService.generate_jwt_token(student) return {"token": token}, 200 @app.route("/api/auth/register", methods=["POST"]) diff --git a/requirements.txt b/requirements.txt index 013ba8a..7fae6dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,7 +34,6 @@ packaging~=24.2 pycparser~=2.22 wsproto~=1.2.0 webdriver-manager~=4.0.2 -jwt~=1.3.1 PyJWT~=2.10.1 snowflake-id~=1.0.2 ics~=0.7.2 \ No newline at end of file