From e58b5eb0a16cccfa1746a661484eaeae712d8697 Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 16 Oct 2023 19:46:26 +0300 Subject: [PATCH] delete_chat fixed --- resolvers/chats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resolvers/chats.py b/resolvers/chats.py index 656536a..a89a95c 100644 --- a/resolvers/chats.py +++ b/resolvers/chats.py @@ -92,11 +92,11 @@ async def create_chat(_, info, title="", members=None): async def delete_chat(_, info, chat_id: str): author_id = info.context["author_id"] - chat_str = await redis.execute("GET", f"/chats/{chat_id}") + chat_str = await redis.execute("GET", f"chats/{chat_id}") if chat_str: chat: Chat = json.loads(chat_str) if author_id in chat["admins"]: await redis.execute("DEL", f"chats/{chat_id}") await redis.execute("SREM", f"chats_by_author/{author_id}", chat_id) else: - return {"error": "chat not exist"} + return {"error": "chat not exist"} \ No newline at end of file