From f4ff01398e33d277792f9c8a4380a2bd05eaabd7 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sun, 3 Mar 2024 17:34:26 +0000 Subject: [PATCH] chore(dependencies): stop using fastify's deprecated properties --- src/http.js | 2 +- src/routes/status.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http.js b/src/http.js index 22196bd..b368694 100644 --- a/src/http.js +++ b/src/http.js @@ -117,7 +117,7 @@ module.exports = async client => { : res.statusCode >= 200 ? '&2' : '&f') + res.statusCode; - let responseTime = res.getResponseTime().toFixed(2); + let responseTime = res.elapsedTime.toFixed(2); responseTime = (responseTime >= 100 ? '&c' : responseTime >= 10 diff --git a/src/routes/status.js b/src/routes/status.js index 3031ad6..e70dceb 100644 --- a/src/routes/status.js +++ b/src/routes/status.js @@ -1,6 +1,6 @@ module.exports.get = () => ({ handler: async (req, res) => { - const { status } = res.context.config.client.ws; + const { status } = req.routeOptions.config.client.ws; res.code(status === 0 ? 200 : 503).send(status); }, });