delete-reaction-schema-fix
This commit is contained in:
parent
f5f5cea184
commit
06699a000a
|
@ -314,10 +314,10 @@ async def update_reaction(_, info, rid, reaction):
|
|||
|
||||
@mutation.field("delete_reaction")
|
||||
@login_required
|
||||
async def delete_reaction(_, info, rid):
|
||||
async def delete_reaction(_, info, reaction_id):
|
||||
user_id = info.context["user_id"]
|
||||
with local_session() as session:
|
||||
r = session.query(Reaction).filter(Reaction.id == rid).first()
|
||||
r = session.query(Reaction).filter(Reaction.id == reaction_id).first()
|
||||
if not r:
|
||||
return {"error": "invalid reaction id"}
|
||||
author = session.query(Author).filter(Author.user == user_id).first()
|
||||
|
|
|
@ -329,7 +329,7 @@ type Mutation {
|
|||
# reaction
|
||||
create_reaction(reaction: ReactionInput!): Result!
|
||||
update_reaction(id: Int!, reaction: ReactionInput!): Result!
|
||||
delete_reaction(id: Int!): Result!
|
||||
delete_reaction(reaction_id: Int!): Result!
|
||||
|
||||
# collab
|
||||
create_invite(slug: String, author_id: Int): Result!
|
||||
|
|
Loading…
Reference in New Issue
Block a user