Skip to content

Node.js based forum software built for the modern web

fix: another missing await

Barış Soner Uşaklı10a85e940127
diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js
index 3d40445611..7be6468f88 100644
--- a/src/controllers/helpers.js
+++ b/src/controllers/helpers.js
@@ -133,7 +133,7 @@ helpers.notAllowed = async function (req, res, error) {
if (req.loggedIn || req.uid === -1) {
if (res.locals.isAPI) {
if (req.originalUrl.startsWith(`${relative_path}/api/v3`)) {
- helpers.formatApiResponse(403, res, error);
+ await helpers.formatApiResponse(403, res, error);
} else {
res.status(403).json({
path: req.path.replace(/^\/api/, ''),