mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: another missing await
This commit is contained in:
@@ -133,7 +133,7 @@ helpers.notAllowed = async function (req, res, error) {
|
|||||||
if (req.loggedIn || req.uid === -1) {
|
if (req.loggedIn || req.uid === -1) {
|
||||||
if (res.locals.isAPI) {
|
if (res.locals.isAPI) {
|
||||||
if (req.originalUrl.startsWith(`${relative_path}/api/v3`)) {
|
if (req.originalUrl.startsWith(`${relative_path}/api/v3`)) {
|
||||||
helpers.formatApiResponse(403, res, error);
|
await helpers.formatApiResponse(403, res, error);
|
||||||
} else {
|
} else {
|
||||||
res.status(403).json({
|
res.status(403).json({
|
||||||
path: req.path.replace(/^\/api/, ''),
|
path: req.path.replace(/^\/api/, ''),
|
||||||
|
|||||||
Reference in New Issue
Block a user