published-fix
This commit is contained in:
parent
d9189fb48b
commit
f089d4903b
|
@ -21,7 +21,7 @@ async def load_shouts_by(_, info, by, amount=50, offset=0):
|
|||
"""
|
||||
:param by: {
|
||||
layout: 'audio',
|
||||
published: true,
|
||||
visibility: "public",
|
||||
author: 'discours',
|
||||
topic: 'culture',
|
||||
title: 'something',
|
||||
|
@ -49,8 +49,8 @@ async def load_shouts_by(_, info, by, amount=50, offset=0):
|
|||
if by.get("reacted"):
|
||||
user = info.context["request"].user
|
||||
q = q.filter(Reaction.createdBy == user.slug)
|
||||
if by.get("published"):
|
||||
q = q.filter(Shout.publishedAt.is_not(None))
|
||||
if by.get("visibility"):
|
||||
q = q.filter(Shout.visibility == by.get("visibility") or "public")
|
||||
if by.get("layout"):
|
||||
q = q.filter(Shout.layout == by["layout"])
|
||||
if by.get("author"):
|
||||
|
|
|
@ -218,7 +218,6 @@ input ShoutsBy {
|
|||
topic: String
|
||||
author: String
|
||||
layout: String
|
||||
published: Boolean
|
||||
visibility: String
|
||||
order: String
|
||||
days: Int
|
||||
|
|
Loading…
Reference in New Issue
Block a user