fix: bug where newly create cids were not responding via webfinger, 404 on webfinger errors, not 400

This commit is contained in:
Julian Lam
2025-01-15 15:14:15 -05:00
parent 487e7be52c
commit c17809e450
2 changed files with 2 additions and 1 deletions

View File

@@ -92,6 +92,7 @@ module.exports = function (Categories) {
['categories:cid', category.order, category.cid], ['categories:cid', category.order, category.cid],
[`cid:${parentCid}:children`, category.order, category.cid], [`cid:${parentCid}:children`, category.order, category.cid],
['categories:name', 0, `${data.name.slice(0, 200).toLowerCase()}:${category.cid}`], ['categories:name', 0, `${data.name.slice(0, 200).toLowerCase()}:${category.cid}`],
['categoryhandle:cid', cid, handle],
]); ]);
await privileges.categories.give(result.defaultPrivileges, category.cid, ['registered-users', 'fediverse']); await privileges.categories.give(result.defaultPrivileges, category.cid, ['registered-users', 'fediverse']);

View File

@@ -40,7 +40,7 @@ Controller.webfinger = async (req, res) => {
res.status(200).json(response); res.status(200).json(response);
} catch (e) { } catch (e) {
res.sendStatus(400); res.sendStatus(404);
} }
}; };