Compare commits
1 Commits
1e6c0089f8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b016b45b0f |
@@ -14,7 +14,7 @@ jobs:
|
||||
- name: Test backend
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.11"
|
||||
python-version: "3.10"
|
||||
- run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r back/requirements.txt
|
||||
|
||||
@@ -55,7 +55,7 @@ def verify_password(plain_password, hashed_password):
|
||||
def get_password_hash(password):
|
||||
return pwd_context.hash(password)
|
||||
|
||||
def authenticate_user(name, password):
|
||||
def authenticate_user(db, name, password):
|
||||
user = get_user(db, name)
|
||||
if len(user) == 0:
|
||||
return False
|
||||
@@ -97,7 +97,7 @@ async def login_for_access_token(
|
||||
form_data: OAuth2PasswordRequestForm = Depends(),
|
||||
db=Depends(get_db)
|
||||
):
|
||||
user = authenticate_user(form_data.username, form_data.password)
|
||||
user = authenticate_user(db, form_data.username, form_data.password)
|
||||
username = form_data.username
|
||||
if not user:
|
||||
raise HTTPException(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
annotated-doc==0.0.4
|
||||
annotated-types==0.7.0
|
||||
anyio==4.12.1
|
||||
bcrypt==5.0.0
|
||||
bcrypt<4.0.0
|
||||
certifi==2026.1.4
|
||||
click==8.1.8
|
||||
dnspython==2.7.0
|
||||
|
||||
Reference in New Issue
Block a user