scope-passed

This commit is contained in:
2022-12-13 03:44:35 +03:00
parent 4df9390b2d
commit 9d783c1c74
4 changed files with 49 additions and 9 deletions

View File

@@ -6,11 +6,12 @@ from auth.authenticate import login_required
from auth.credentials import AuthCredentials
from base.redis import redis
from base.resolvers import mutation
from validations.inbox import Chat
@mutation.field("updateChat")
@login_required
async def update_chat(_, info, chat_new: dict):
async def update_chat(_, info, chat_new: Chat):
"""
updating chat
requires info["request"].user.slug to be in chat["admins"]