rm-reaction-debug

This commit is contained in:
Untone 2024-03-07 08:13:19 +03:00
parent e4e681a9ab
commit c84aae40d3

View File

@ -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()