fix: lint

This commit is contained in:
Julian Lam
2024-07-05 15:58:47 -04:00
parent af6ae6ee8a
commit b0eec67d78
2 changed files with 2 additions and 3 deletions

View File

@@ -361,7 +361,6 @@ Helpers.generateCollection = async ({ set, method, page, perPage, url }) => {
method = db.getSortedSetRange; method = db.getSortedSetRange;
} }
const count = await db.sortedSetCard(set); const count = await db.sortedSetCard(set);
// const { cid, titleRaw: name, mainPid, slug, postcount: count } = await topics.getTopicFields(req.params.tid, ['cid', 'title', 'mainPid', 'slug', 'postcount']);
const pageCount = Math.max(1, Math.ceil(count / perPage)); const pageCount = Math.max(1, Math.ceil(count / perPage));
let items; let items;
let paginate = true; let paginate = true;

View File

@@ -85,12 +85,12 @@ Actors.replies = async function (req, res) {
id: `${nconf.get('url')}/post/${req.params.pid}/replies${replies.orderedItems && page ? `?page=${page}` : ''}`, id: `${nconf.get('url')}/post/${req.params.pid}/replies${replies.orderedItems && page ? `?page=${page}` : ''}`,
url: `${nconf.get('url')}/post/${req.params.pid}`, url: `${nconf.get('url')}/post/${req.params.pid}`,
...replies, ...replies,
} };
res.status(200).json(object); res.status(200).json(object);
}; };
Actors.topic = async function (req, res, next) { Actors.topic = async function (req, res) {
const allowed = await privileges.topics.can('topics:read', req.params.tid, activitypub._constants.uid); const allowed = await privileges.topics.can('topics:read', req.params.tid, activitypub._constants.uid);
if (!allowed) { if (!allowed) {
return res.sendStatus(404); return res.sendStatus(404);