drafts-api-common
All checks were successful
Deploy on push / deploy (push) Successful in 25s

This commit is contained in:
Untone 2024-05-06 21:14:17 +03:00
parent 205019ce39
commit b372fd81d5
2 changed files with 2 additions and 4 deletions

View File

@ -83,9 +83,7 @@ async def get_shouts_drafts(_, info):
# user_id = info.context.get("user_id") # user_id = info.context.get("user_id")
author_dict = info.context.get("author") author_dict = info.context.get("author")
if not author_dict: if not author_dict:
logger.error("trying to get drafts failed") return {"error": "author profile was not found"}
# logger.debug(info)
return []
author_id = author_dict.get("id") author_id = author_dict.get("id")
shouts = [] shouts = []
with local_session() as session: with local_session() as session:

View File

@ -33,7 +33,7 @@ type Query {
# editor # editor
get_my_shout(shout_id: Int!): CommonResult! get_my_shout(shout_id: Int!): CommonResult!
get_shouts_drafts: [Shout] get_shouts_drafts: CommonResult!
# topic # topic
get_topic(slug: String!): Topic get_topic(slug: String!): Topic