From e4525b96c3c75145019cdea9d6fa3b937f9dcf9d Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Sat, 8 Feb 2025 08:04:36 -0800 Subject: [PATCH] add validation --- Server/controllers/statusPageController.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Server/controllers/statusPageController.js b/Server/controllers/statusPageController.js index 50f2e1ee4..de2e786a6 100644 --- a/Server/controllers/statusPageController.js +++ b/Server/controllers/statusPageController.js @@ -71,6 +71,13 @@ class StatusPageController { }; getStatusPageByUrl = async (req, res, next) => { + try { + await getStatusPageParamValidation.validateAsync(req.params); + } catch (error) { + next(handleValidationError(error, SERVICE_NAME)); + return; + } + try { const statusPage = await this.db.getStatusPageByUrl(req.params.url); return res.success({