follow-debug
This commit is contained in:
parent
adbcec2511
commit
bb2edd13e9
|
@ -28,8 +28,8 @@ logger.setLevel(logging.DEBUG)
|
||||||
@login_required
|
@login_required
|
||||||
@mutation.field("follow")
|
@mutation.field("follow")
|
||||||
async def follow(_, info, what, slug):
|
async def follow(_, info, what, slug):
|
||||||
user_id = info.context["user_id"]
|
|
||||||
try:
|
try:
|
||||||
|
user_id = info.context["user_id"]
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
actor = session.query(Author).filter(Author.user == user_id).first()
|
actor = session.query(Author).filter(Author.user == user_id).first()
|
||||||
if actor:
|
if actor:
|
||||||
|
@ -54,6 +54,7 @@ async def follow(_, info, what, slug):
|
||||||
result = FollowingResult("NEW", "shout", slug)
|
result = FollowingResult("NEW", "shout", slug)
|
||||||
await FollowingManager.push("shout", result)
|
await FollowingManager.push("shout", result)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
logger.debug(info, what, slug)
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
return {"error": str(e)}
|
return {"error": str(e)}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user