Fix: typo in code to find user in blacklist

This commit is contained in:
sunwoo1524 2024-11-10 13:28:19 +09:00
parent b676ba7429
commit 7eba1ebfec

View file

@ -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.")