create-msg-fix3
This commit is contained in:
parent
32fc9646a3
commit
a891470527
|
@ -44,7 +44,7 @@ type Mutation {
|
|||
updateChat(chat: ChatInput!): ChatResult!
|
||||
deleteChat(chatId: String!): ChatResult!
|
||||
|
||||
createMessage(chatId: String!, body: String!, replyTo: Int): ChatResult!
|
||||
createMessage(chat: String!, body: String!, replyTo: Int): ChatResult!
|
||||
updateMessage(chatId: String!, id: Int!, body: String!): ChatResult!
|
||||
deleteMessage(chatId: String!, id: Int!): ChatResult!
|
||||
markAsRead(chatId: String!, ids: [Int]!): ChatResult!
|
||||
|
|
|
@ -10,7 +10,7 @@ from services.schema import mutation
|
|||
|
||||
@mutation.field("createMessage")
|
||||
@login_required
|
||||
async def create_message(_, info, chatId: str, body: str, reply_to=None):
|
||||
async def create_message(_, info, chat: str, body: str, reply_to=None):
|
||||
"""
|
||||
create message with
|
||||
:body for
|
||||
|
@ -19,7 +19,7 @@ async def create_message(_, info, chatId: str, body: str, reply_to=None):
|
|||
"""
|
||||
author_id = info.context["author_id"]
|
||||
|
||||
chat_data = await redis.execute("GET", f"chats/{chatId}")
|
||||
chat_data = await redis.execute("GET", f"chats/{chat}")
|
||||
if not chat_data:
|
||||
return {"error": "chat is not exist"}
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user