Skip to content
Permalink
Browse files
make it so /all?short=block will only shorten blocks, not allows
  • Loading branch information
Humbedooh committed Aug 16, 2021
1 parent 1fd8eb9 commit d040488c440a567a3b3d51b5ba7e452446bf88b6
Showing 1 changed file with 2 additions and 1 deletion.
@@ -29,8 +29,9 @@ async def process(state: plugins.configuration.BlockyConfiguration, request, for
total_blocks = len(block_items)
total_allows = len(allow_items)
if short: # For not showing all 27482487 items, for front page
allow_items = sorted(allow_items, reverse=True, key=operator.itemgetter("timestamp"))[:25]
block_items = sorted(block_items, reverse=True, key=operator.itemgetter("timestamp"))[:25]
if short != "block":
allow_items = sorted(allow_items, reverse=True, key=operator.itemgetter("timestamp"))[:25]
return {
"total_block": total_blocks,
"total_allow": total_allows,

0 comments on commit d040488

Please sign in to comment.