create-msg-fix2

This commit is contained in:
2023-10-13 21:09:20 +03:00
parent 3959a36d8a
commit 32fc9646a3
2 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ from services.schema import mutation
@mutation.field("createMessage")
@login_required
async def create_message(_, info, chat_id: str, body: str, reply_to=None):
async def create_message(_, info, chatId: str, body: str, reply_to=None):
"""
create message with
:body for
@@ -19,7 +19,7 @@ async def create_message(_, info, chat_id: str, body: str, reply_to=None):
"""
author_id = info.context["author_id"]
chat_data = await redis.execute("GET", f"chats/{chat_id}")
chat_data = await redis.execute("GET", f"chats/{chatId}")
if not chat_data:
return {"error": "chat is not exist"}
else: