From 1a11c6f39670fc0f273044f58e602da6fe0a19c0 Mon Sep 17 00:00:00 2001 From: Peter Lewis Date: Wed, 1 Feb 2023 11:22:07 +0000 Subject: [PATCH] Update Util.js --- src/lib/Util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Util.js b/src/lib/Util.js index 2a47a20e..cc6e89c2 100644 --- a/src/lib/Util.js +++ b/src/lib/Util.js @@ -21,7 +21,7 @@ module.exports = class Util { // eslint-disable-next-line func-names return function(req, res) { Promise.resolve().then(async () => fn(req, res)) - .then(result => { + .then((result) => { if (res.headersSent) return; if (typeof result === 'undefined') { @@ -34,7 +34,7 @@ module.exports = class Util { .status(200) .json(result); }) - .catch(error => { + .catch((error) => { if (typeof error === 'string') { error = new Error(error); }