aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal-server')
-rw-r--r--src/internal-server/app/Controllers/Http/StaticController.js15
-rw-r--r--src/internal-server/start/routes.js17
2 files changed, 11 insertions, 21 deletions
diff --git a/src/internal-server/app/Controllers/Http/StaticController.js b/src/internal-server/app/Controllers/Http/StaticController.js
index 28c5389a9..33e0e52d9 100644
--- a/src/internal-server/app/Controllers/Http/StaticController.js
+++ b/src/internal-server/app/Controllers/Http/StaticController.js
@@ -7,25 +7,14 @@ import { DEFAULT_FEATURES_CONFIG } from '../../../../config';
7// TODO: This endpoint and associated code needs to be remoeved as cleanup 7// TODO: This endpoint and associated code needs to be remoeved as cleanup
8class StaticController { 8class StaticController {
9 // Enable all features 9 // Enable all features
10 features({ 10 features({ response }) {
11 response,
12 }) {
13 return response.send(DEFAULT_FEATURES_CONFIG); 11 return response.send(DEFAULT_FEATURES_CONFIG);
14 } 12 }
15 13
16 // Return an empty array 14 // Return an empty array
17 emptyArray({ 15 emptyArray({ response }) {
18 response,
19 }) {
20 return response.send([]); 16 return response.send([]);
21 } 17 }
22
23 // Show announcements
24 announcement({
25 response,
26 }) {
27 return response.send({});
28 }
29} 18}
30 19
31export default StaticController; 20export default StaticController;
diff --git a/src/internal-server/start/routes.js b/src/internal-server/start/routes.js
index b32b094ee..e75380ccd 100644
--- a/src/internal-server/start/routes.js
+++ b/src/internal-server/start/routes.js
@@ -25,12 +25,12 @@ const OnlyAllowFerdi = async ({ request, response }, next) => {
25}; 25};
26 26
27// Health: Returning if all systems function correctly 27// Health: Returning if all systems function correctly
28Route.get('health', ({ 28Route.get('health', ({ response }) =>
29 response, 29 response.send({
30}) => response.send({ 30 api: 'success',
31 api: 'success', 31 db: 'success',
32 db: 'success', 32 }),
33})).middleware(OnlyAllowFerdi); 33).middleware(OnlyAllowFerdi);
34 34
35// API is grouped under '/v1/' route 35// API is grouped under '/v1/' route
36Route.group(() => { 36Route.group(() => {
@@ -67,8 +67,9 @@ Route.group(() => {
67 Route.get('features/:mode?', 'StaticController.features'); 67 Route.get('features/:mode?', 'StaticController.features');
68 Route.get('services', 'StaticController.emptyArray'); 68 Route.get('services', 'StaticController.emptyArray');
69 Route.get('news', 'StaticController.emptyArray'); 69 Route.get('news', 'StaticController.emptyArray');
70 Route.get('announcements/:version', 'StaticController.announcement'); 70})
71}).prefix(API_VERSION).middleware(OnlyAllowFerdi); 71 .prefix(API_VERSION)
72 .middleware(OnlyAllowFerdi);
72 73
73Route.group(() => { 74Route.group(() => {
74 Route.get('icon/:id', 'ServiceController.icon'); 75 Route.get('icon/:id', 'ServiceController.icon');