From dfe19a98c193bdfdd601f4f7e4be06e67f8431b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 13 Sep 2025 17:51:25 -0400 Subject: [PATCH] fix: don't show votes on unread if rep system disabled add openapi spec --- public/openapi/read/popular.yaml | 2 ++ public/openapi/read/recent.yaml | 2 ++ public/openapi/read/top.yaml | 2 ++ public/openapi/read/unread.yaml | 2 ++ src/controllers/unread.js | 1 + 5 files changed, 9 insertions(+) diff --git a/public/openapi/read/popular.yaml b/public/openapi/read/popular.yaml index 67c7d5030f..fe6a0a6480 100644 --- a/public/openapi/read/popular.yaml +++ b/public/openapi/read/popular.yaml @@ -60,6 +60,8 @@ get: type: string feeds:disableRSS: type: number + reputation:disabled: + type: number rssFeedUrl: type: string title: diff --git a/public/openapi/read/recent.yaml b/public/openapi/read/recent.yaml index 74d3d91a27..848a306b79 100644 --- a/public/openapi/read/recent.yaml +++ b/public/openapi/read/recent.yaml @@ -58,6 +58,8 @@ get: type: string feeds:disableRSS: type: number + reputation:disabled: + type: number rssFeedUrl: type: string title: diff --git a/public/openapi/read/top.yaml b/public/openapi/read/top.yaml index 8594ca9f14..6f0cbc9bc1 100644 --- a/public/openapi/read/top.yaml +++ b/public/openapi/read/top.yaml @@ -71,6 +71,8 @@ get: type: string feeds:disableRSS: type: number + reputation:disabled: + type: number rssFeedUrl: type: string title: diff --git a/public/openapi/read/unread.yaml b/public/openapi/read/unread.yaml index ea69f666dd..77e9ec44f6 100644 --- a/public/openapi/read/unread.yaml +++ b/public/openapi/read/unread.yaml @@ -19,6 +19,8 @@ get: type: boolean showTopicTools: type: boolean + reputation:disabled: + type: number nextStart: type: number topics: diff --git a/src/controllers/unread.js b/src/controllers/unread.js index 9ff73da6ff..871f3252c0 100644 --- a/src/controllers/unread.js +++ b/src/controllers/unread.js @@ -75,6 +75,7 @@ unreadController.get = async function (req, res) { data.selectedTags = tagData.selectedTags; data.filters = helpers.buildFilters(baseUrl, filter, req.query); data.selectedFilter = data.filters.find(filter => filter && filter.selected); + data['reputation:disabled'] = meta.config['reputation:disabled']; res.render('unread', data); };