This commit is contained in:
parent
64e8c8afd7
commit
f930822d8a
|
@ -44,6 +44,7 @@ def add_stat_columns(q):
|
||||||
|
|
||||||
|
|
||||||
def apply_filters(q, filters, author_id=None):
|
def apply_filters(q, filters, author_id=None):
|
||||||
|
# LoadShoutsFilters handling
|
||||||
if filters.get("reacted") and author_id:
|
if filters.get("reacted") and author_id:
|
||||||
q.join(Reaction, Reaction.created_by == author_id)
|
q.join(Reaction, Reaction.created_by == author_id)
|
||||||
|
|
||||||
|
@ -125,6 +126,7 @@ async def load_shouts_by(_, info, options):
|
||||||
:param options: {
|
:param options: {
|
||||||
filters: {
|
filters: {
|
||||||
layouts: ['audio', 'video', ..],
|
layouts: ['audio', 'video', ..],
|
||||||
|
reacted: True,
|
||||||
visibility: "public",
|
visibility: "public",
|
||||||
author: 'discours',
|
author: 'discours',
|
||||||
topic: 'culture',
|
topic: 'culture',
|
||||||
|
@ -167,7 +169,6 @@ async def load_shouts_by(_, info, options):
|
||||||
reacted_stat,
|
reacted_stat,
|
||||||
commented_stat,
|
commented_stat,
|
||||||
rating_stat,
|
rating_stat,
|
||||||
_last_comment,
|
|
||||||
] in session.execute(q).unique():
|
] in session.execute(q).unique():
|
||||||
shouts.append(shout)
|
shouts.append(shout)
|
||||||
shout.stat = {
|
shout.stat = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user