From e9eadfe838a57fd74df7cb5d43961dfcb045dd1a Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Sun, 19 Jan 2025 12:05:45 -0800 Subject: [PATCH] use response middleware in StatusPageController --- Server/controllers/statusPageController.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Server/controllers/statusPageController.js b/Server/controllers/statusPageController.js index bbb7a18ee..741617ff0 100644 --- a/Server/controllers/statusPageController.js +++ b/Server/controllers/statusPageController.js @@ -22,8 +22,7 @@ class StatusPageController { try { const statusPage = await this.db.createStatusPage(req.body); - return res.status(200).json({ - success: true, + return res.successs({ msg: successMessages.STATUS_PAGE_CREATE, data: statusPage, }); @@ -42,8 +41,7 @@ class StatusPageController { try { const { url } = req.params; const statusPage = await this.db.getStatusPageByUrl(url); - return res.status(200).json({ - success: true, + return res.successs({ msg: successMessages.STATUS_PAGE_BY_URL, data: statusPage, });