refac
This commit is contained in:
@@ -1134,7 +1134,7 @@ async def delete_chat_by_id(
|
|||||||
detail=ERROR_MESSAGES.ACCESS_PROHIBITED,
|
detail=ERROR_MESSAGES.ACCESS_PROHIBITED,
|
||||||
)
|
)
|
||||||
|
|
||||||
chat = Chats.get_chat_by_id(id, db=db)
|
chat = Chats.get_chat_by_id_and_user_id(id, user.id, db=db)
|
||||||
if not chat:
|
if not chat:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_404_NOT_FOUND,
|
status_code=status.HTTP_404_NOT_FOUND,
|
||||||
|
|||||||
Reference in New Issue
Block a user