From f39cbe7d803245702885b308ab1cee4551aea9a1 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Sat, 4 Sep 2021 17:03:53 +0200 Subject: chore: remove what's new functionality (#1864) --- .../app/Controllers/Http/StaticController.js | 15 ++------------- src/internal-server/start/routes.js | 17 +++++++++-------- 2 files changed, 11 insertions(+), 21 deletions(-) (limited to 'src/internal-server') 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'; // TODO: This endpoint and associated code needs to be remoeved as cleanup class StaticController { // Enable all features - features({ - response, - }) { + features({ response }) { return response.send(DEFAULT_FEATURES_CONFIG); } // Return an empty array - emptyArray({ - response, - }) { + emptyArray({ response }) { return response.send([]); } - - // Show announcements - announcement({ - response, - }) { - return response.send({}); - } } export 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) => { }; // Health: Returning if all systems function correctly -Route.get('health', ({ - response, -}) => response.send({ - api: 'success', - db: 'success', -})).middleware(OnlyAllowFerdi); +Route.get('health', ({ response }) => + response.send({ + api: 'success', + db: 'success', + }), +).middleware(OnlyAllowFerdi); // API is grouped under '/v1/' route Route.group(() => { @@ -67,8 +67,9 @@ Route.group(() => { Route.get('features/:mode?', 'StaticController.features'); Route.get('services', 'StaticController.emptyArray'); Route.get('news', 'StaticController.emptyArray'); - Route.get('announcements/:version', 'StaticController.announcement'); -}).prefix(API_VERSION).middleware(OnlyAllowFerdi); +}) + .prefix(API_VERSION) + .middleware(OnlyAllowFerdi); Route.group(() => { Route.get('icon/:id', 'ServiceController.icon'); -- cgit v1.2.3-70-g09d2