resolvers-renamed
Some checks failed
deploy / deploy (push) Failing after 1m7s

This commit is contained in:
2023-11-28 11:33:50 +03:00
parent 493f6106ab
commit 15139249f1
8 changed files with 34 additions and 34 deletions

View File

@@ -8,7 +8,7 @@ from services.schema import mutation
from models.chat import Message
@mutation.field("createMessage")
@mutation.field("create_message")
@login_required
async def create_message(_, info, chat_id: str, body: str, reply_to=None):
"""Создание сообщения с телом :body для чата :chat_id с возможным ответом на :reply_to"""
@@ -76,7 +76,7 @@ async def create_message(_, info, chat_id: str, body: str, reply_to=None):
return {"message": new_message, "error": None}
@mutation.field("updateMessage")
@mutation.field("update_message")
@login_required
async def update_message(_, info, message):
author_id = info.context["author_id"]
@@ -144,7 +144,7 @@ async def delete_message(_, info, chat_id: str, message_id: int):
return {}
@mutation.field("markAsRead")
@mutation.field("mark_as_read")
@login_required
async def mark_as_read(_, info, chat_id: str, message_id: int):
author_id = info.context["author_id"]