From ae9726f747b2ec3e5805d03ef04ad47cb7628315 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Mon, 10 Jun 2024 05:08:59 +0300 Subject: Refactoring --- api/routes/default/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'api/routes/default') diff --git a/api/routes/default/index.js b/api/routes/default/index.js index 5bace64..19b069b 100644 --- a/api/routes/default/index.js +++ b/api/routes/default/index.js @@ -1,6 +1,7 @@ const settings = require('../../settings'); module.exports = (req, res) => { - res.send({ + res.writeHead(404, { 'Content-Type': 'application/json'}); + res.end(JSON.stringify({ message:"Hello! Welcome to Arching Kaos API! See available routes below!", routes:{ GET:[ @@ -21,6 +22,6 @@ module.exports = (req, res) => { {send_me_a_zblock:settings.DEF_PROTO+"["+settings.LOCAL_IP+"]:"+settings.PORT+settings.URL_PREFIX+"/announce/zblock"}, ] } - }); + })); } -- cgit v1.2.3