unfollow-debug
This commit is contained in:
parent
7234eb9519
commit
bda2b7b59a
|
@ -73,6 +73,7 @@ async def follow(_, info, what, slug):
|
||||||
@login_required
|
@login_required
|
||||||
async def unfollow(_, info, what, slug):
|
async def unfollow(_, info, what, slug):
|
||||||
follows = None
|
follows = None
|
||||||
|
error = ''
|
||||||
try:
|
try:
|
||||||
user_id = info.context.get('user_id')
|
user_id = info.context.get('user_id')
|
||||||
if not user_id:
|
if not user_id:
|
||||||
|
@ -105,9 +106,11 @@ async def unfollow(_, info, what, slug):
|
||||||
elif what == 'REACTIONS':
|
elif what == 'REACTIONS':
|
||||||
reactions_unfollow(follower.id, slug)
|
reactions_unfollow(follower.id, slug)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return {'error': str(e)}
|
error = e
|
||||||
|
import traceback
|
||||||
return {f'{what.lower()}s': follows}
|
traceback.print_exc()
|
||||||
|
finally:
|
||||||
|
return {'error': str(error), f'{what.lower()}s': follows}
|
||||||
|
|
||||||
|
|
||||||
async def get_follows_by_user_id(user_id: str):
|
async def get_follows_by_user_id(user_id: str):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user