create-reaction-unauthorized-handling
All checks were successful
Deploy on push / deploy (push) Successful in 26s

This commit is contained in:
2024-05-18 12:38:46 +03:00
parent c80229b7b9
commit 0f5df77d28
3 changed files with 15 additions and 12 deletions

View File

@@ -207,7 +207,8 @@ async def create_reaction(_, info, reaction):
info.context.get("user_id")
author_id = info.context.get("author", {}).get("id")
shout_id = reaction.get("shout")
if not author_id:
return {"error": "Unauthorized"}
if not shout_id:
return {"error": "Shout ID is required to create a reaction."}