From 506f75f6f178c8e95b92c5bf05874c7bc9d2c1a2 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 28 Dec 2019 16:58:06 +0100 Subject: [PATCH] Indicates that calls are disabled --- src/controllers/CallsController.ts | 24 ++++++++++++++++++++++++ src/controllers/Routes.ts | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 src/controllers/CallsController.ts diff --git a/src/controllers/CallsController.ts b/src/controllers/CallsController.ts new file mode 100644 index 0000000..2876d6e --- /dev/null +++ b/src/controllers/CallsController.ts @@ -0,0 +1,24 @@ +import { RequestHandler } from "../entities/RequestHandler"; + +/** + * Legacy calls controller + * + * @author Pierre HUBERT + */ + +export class CallsController { + + /** + * Get calls config + * + * This version of the API DOES NOT SUPPORT calls system for + * now. It is planned to reimagine it completely before attempting + * an implementation... + */ + public static GetConfig(h: RequestHandler) { + h.send({ + enabled: false + }); + } + +} \ No newline at end of file diff --git a/src/controllers/Routes.ts b/src/controllers/Routes.ts index 7408cab..21e2a49 100644 --- a/src/controllers/Routes.ts +++ b/src/controllers/Routes.ts @@ -8,6 +8,7 @@ import { GroupsController } from "./GroupsController"; import { NotificationsController } from "./NotificationsController"; import { VirtualDirectoryController } from "./VirtualDirectoryController"; import { WebAppControllers } from "./WebAppController"; +import { CallsController } from "./CallsController"; /** * Controllers routes @@ -157,5 +158,8 @@ export const Routes : Route[] = [ // Web app controller {path: "/webApp/getMemberships", cb: (h) => WebAppControllers.GetMemberships(h)}, + + // Calls controller + {path: "/calls/config", cb: (h) => CallsController.GetConfig(h)}, ] \ No newline at end of file