mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 23:40:38 +01:00
fix: allow category controller to respond also by remote category id
This commit is contained in:
@@ -33,7 +33,10 @@ categoryController.get = async function (req, res, next) {
|
|||||||
|
|
||||||
if (!utils.isNumber(cid)) {
|
if (!utils.isNumber(cid)) {
|
||||||
const assertion = await activitypub.actors.assertGroup([cid]);
|
const assertion = await activitypub.actors.assertGroup([cid]);
|
||||||
|
if (!activitypub.helpers.isUri(cid)) {
|
||||||
cid = await db.getObjectField('handle:cid', cid);
|
cid = await db.getObjectField('handle:cid', cid);
|
||||||
|
}
|
||||||
|
|
||||||
if (!assertion || !cid) {
|
if (!assertion || !cid) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user