From aa3e0131d21748c95b93d679de35383a9514e4d3 Mon Sep 17 00:00:00 2001 From: Pika <15848969+ThatNerdyPikachu@users.noreply.github.com> Date: Sat, 9 Jun 2018 10:20:37 -0400 Subject: [PATCH 1/2] make a JSON endpoint actually send JSON --- routes/root/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/root/index.js b/routes/root/index.js index a7228db..dd66e85 100644 --- a/routes/root/index.js +++ b/routes/root/index.js @@ -10,7 +10,7 @@ route_debugger.log('Loading \'root/misc\' API routes'); * Description: tests the validity of this server by returning a predefined message */ routes.get('/isthisworking', async (req, res) => { - return res.send('{"server": "account.nintendo.net"}'); + return res.json({"server": "account.nintendo.net"}); }); module.exports = routes; From 799289ce12a348e860c65a0e2335b8a0764315a6 Mon Sep 17 00:00:00 2001 From: Pika <15848969+ThatNerdyPikachu@users.noreply.github.com> Date: Sat, 9 Jun 2018 10:27:35 -0400 Subject: [PATCH 2/2] kys eslint --- routes/root/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/root/index.js b/routes/root/index.js index dd66e85..5e647e6 100644 --- a/routes/root/index.js +++ b/routes/root/index.js @@ -10,7 +10,7 @@ route_debugger.log('Loading \'root/misc\' API routes'); * Description: tests the validity of this server by returning a predefined message */ routes.get('/isthisworking', async (req, res) => { - return res.json({"server": "account.nintendo.net"}); + return res.json({'server': 'account.nintendo.net'}); }); module.exports = routes;