rm-reaction-debug
This commit is contained in:
parent
e4e681a9ab
commit
c84aae40d3
|
@ -302,6 +302,8 @@ async def delete_reaction(_, info, reaction_id: int):
|
||||||
if r.created_by != author.id and 'editor' not in roles:
|
if r.created_by != author.id and 'editor' not in roles:
|
||||||
return {'error': 'access denied'}
|
return {'error': 'access denied'}
|
||||||
|
|
||||||
|
logger.debug(f'{user_id} user removing his #{reaction_id} reaction')
|
||||||
|
|
||||||
if r.kind in [ReactionKind.LIKE.value, ReactionKind.DISLIKE.value]:
|
if r.kind in [ReactionKind.LIKE.value, ReactionKind.DISLIKE.value]:
|
||||||
session.delete(r)
|
session.delete(r)
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user