server-cli-todo-cleanup

This commit is contained in:
2022-08-11 14:22:10 +03:00
parent 0ba5047ff9
commit f13f40c89a
18 changed files with 106 additions and 33 deletions

View File

@@ -51,7 +51,7 @@ async def view_shout(_, info, slug):
@query.field("getShoutBySlug")
async def get_shout_by_slug(_, info, slug):
shout = None
# TODO: append captions anyhow
# FIXME: append captions anyhow
with local_session() as session:
shout = session.query(Shout).\
options([
@@ -65,7 +65,7 @@ async def get_shout_by_slug(_, info, slug):
if not shout:
print(f"[resolvers.zine] error: shout with slug {slug} not exist")
return {} #TODO return error field
return {"error" : "shout not found"}
return shout