Node.js based forum software built for the modern web
fix: don't show votes on unread if rep system disabled
Barış Soner Uşaklıdfe19a98c193
diff --git a/public/openapi/read/popular.yaml b/public/openapi/read/popular.yamlindex 67c7d5030f..fe6a0a6480 100644--- a/public/openapi/read/popular.yaml+++ b/public/openapi/read/popular.yaml@@ -60,6 +60,8 @@ get:type: stringfeeds:disableRSS:type: number+ reputation:disabled:+ type: numberrssFeedUrl:type: stringtitle:diff --git a/public/openapi/read/recent.yaml b/public/openapi/read/recent.yamlindex 74d3d91a27..848a306b79 100644--- a/public/openapi/read/recent.yaml+++ b/public/openapi/read/recent.yaml@@ -58,6 +58,8 @@ get:type: stringfeeds:disableRSS:type: number+ reputation:disabled:+ type: numberrssFeedUrl:type: stringtitle:diff --git a/public/openapi/read/top.yaml b/public/openapi/read/top.yamlindex 8594ca9f14..6f0cbc9bc1 100644--- a/public/openapi/read/top.yaml+++ b/public/openapi/read/top.yaml@@ -71,6 +71,8 @@ get:type: stringfeeds:disableRSS:type: number+ reputation:disabled:+ type: numberrssFeedUrl:type: stringtitle:diff --git a/public/openapi/read/unread.yaml b/public/openapi/read/unread.yamlindex ea69f666dd..77e9ec44f6 100644--- a/public/openapi/read/unread.yaml+++ b/public/openapi/read/unread.yaml@@ -19,6 +19,8 @@ get:type: booleanshowTopicTools:type: boolean+ reputation:disabled:+ type: numbernextStart:type: numbertopics:diff --git a/src/controllers/unread.js b/src/controllers/unread.jsindex 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);};