Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
mael-app committed Jan 17, 2025
2 parents 5cf04d9 + 70cb623 commit d202ddd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/.idea
/scrapers-config.json
/scrapers.json
/.venv/
3 changes: 2 additions & 1 deletion app/api/routes/auth_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"])
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d202ddd

Please sign in to comment.