aboutsummaryrefslogtreecommitdiff
path: root/api/routes/default
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-06-10 05:08:59 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-06-10 05:08:59 +0300
commitae9726f747b2ec3e5805d03ef04ad47cb7628315 (patch)
treecebc25f70264532a3b6276c4c7acc159d4703d2e /api/routes/default
parentab7cbfd693c6251f6c1bc427eb9a65b1dbee159e (diff)
downloadarching-kaos-tools-ae9726f747b2ec3e5805d03ef04ad47cb7628315.tar.gz
arching-kaos-tools-ae9726f747b2ec3e5805d03ef04ad47cb7628315.tar.bz2
arching-kaos-tools-ae9726f747b2ec3e5805d03ef04ad47cb7628315.zip
Refactoring
Diffstat (limited to 'api/routes/default')
-rw-r--r--api/routes/default/index.js5
1 files changed, 3 insertions, 2 deletions
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"},
]
}
- });
+ }));
}