mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
refactor: add thumbsOnly option to thumbs retrieval method so that embeds/attachments don't show up in composer thumbnail modal
This commit is contained in:
@@ -127,7 +127,9 @@ Topics.deleteTags = async (req, res) => {
|
||||
};
|
||||
|
||||
Topics.getThumbs = async (req, res) => {
|
||||
helpers.formatApiResponse(200, res, await api.topics.getThumbs(req, { ...req.params }));
|
||||
let { thumbsOnly } = req.query;
|
||||
thumbsOnly = thumbsOnly ? !!parseInt(thumbsOnly, 10) : false;
|
||||
helpers.formatApiResponse(200, res, await api.topics.getThumbs(req, { ...req.params, thumbsOnly }));
|
||||
};
|
||||
|
||||
Topics.addThumb = async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user