From fb3f78ad9911ada2bd9c661451ae7a8607986b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 4 Feb 2025 17:19:20 +0100 Subject: [PATCH] Moderate /best --- src/views/best.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/best.mjs b/src/views/best.mjs index 26370216..87c46048 100644 --- a/src/views/best.mjs +++ b/src/views/best.mjs @@ -47,7 +47,11 @@ async function getStories(trie, page, period, domain) { const totalStories = parseInt(env.TOTAL_STORIES, 10); const from = totalStories * page; const orderBy = null; - const result = getBest(totalStories, from, orderBy, domain, startDatetime); + let result = getBest(totalStories, from, orderBy, domain, startDatetime); + + const policy = await moderation.getLists(); + const path = "/best"; + result = moderation.moderate(result, policy, path); let stories = []; for await (let story of result) {