diff options
Diffstat (limited to 'src/server/ApiManagers/UtilManager.ts')
-rw-r--r-- | src/server/ApiManagers/UtilManager.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/ApiManagers/UtilManager.ts b/src/server/ApiManagers/UtilManager.ts index 61cda2e9b..c1234be6c 100644 --- a/src/server/ApiManagers/UtilManager.ts +++ b/src/server/ApiManagers/UtilManager.ts @@ -2,6 +2,7 @@ import ApiManager, { Registration } from "./ApiManager"; import { Method } from "../RouteManager"; import { exec } from 'child_process'; import { command_line } from "../ActionUtilities"; +import RouteSubscriber from "../RouteSubscriber"; export default class UtilManager extends ApiManager { @@ -9,6 +10,12 @@ export default class UtilManager extends ApiManager { register({ method: Method.GET, + subscription: new RouteSubscriber("environment").add("key"), + onValidation: ({ req, res }) => res.send(process.env[req.params.key]) + }); + + register({ + method: Method.GET, subscription: "/pull", onValidation: async ({ res }) => { return new Promise<void>(resolve => { |