Fix: typo in code to find user in blacklist
This commit is contained in:
parent
b676ba7429
commit
7eba1ebfec
2
main.py
2
main.py
|
@ -25,7 +25,7 @@ def get_feed_of_user(user_handle: str, session: SessionDep):
|
|||
return HTTPException(status_code=400, detail="The handle is invalid.")
|
||||
|
||||
# check if there is the user in blacklist
|
||||
black_user = session.exec(select(Blacklist).where(Blacklist.handle == user_handle)).first
|
||||
black_user = session.exec(select(Blacklist).where(Blacklist.handle == user_handle)).first()
|
||||
if black_user:
|
||||
return HTTPException(status_code=401, detail="The user is in blacklist.")
|
||||
|
||||
|
|
Loading…
Reference in a new issue