aboutsummaryrefslogtreecommitdiff
path: root/src/server/ApiManagers/SessionManager.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-04-03 17:37:36 -0700
committerSam Wilkins <samwilkins333@gmail.com>2020-04-03 17:37:36 -0700
commit3949f6a094f835e495562ab5484b23ade3d1003f (patch)
tree046fc263c6ffad43c90d5236e3fa343870e5b1b6 /src/server/ApiManagers/SessionManager.ts
parent5414cc78dfb650954c9b6fef8115a5945ea8d6a6 (diff)
restored session manager content, things compile and seem to run fine
Diffstat (limited to 'src/server/ApiManagers/SessionManager.ts')
-rw-r--r--src/server/ApiManagers/SessionManager.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/ApiManagers/SessionManager.ts b/src/server/ApiManagers/SessionManager.ts
index c993c985f..bcaa6598f 100644
--- a/src/server/ApiManagers/SessionManager.ts
+++ b/src/server/ApiManagers/SessionManager.ts
@@ -2,7 +2,7 @@ import ApiManager, { Registration } from "./ApiManager";
import { Method, _permission_denied, AuthorizedCore, SecureHandler } from "../RouteManager";
import RouteSubscriber from "../RouteSubscriber";
import { sessionAgent } from "..";
-// import { DashSessionAgent } from "../DashSession/DashSessionAgent";
+import { DashSessionAgent } from "../DashSession/DashSessionAgent";
const permissionError = "You are not authorized!";
@@ -25,15 +25,15 @@ export default class SessionManager extends ApiManager {
protected initialize(register: Registration): void {
- // register({
- // method: Method.GET,
- // subscription: this.secureSubscriber("debug", "to?"),
- // secureHandler: this.authorizedAction(async ({ req: { params }, res }) => {
- // const to = params.to || DashSessionAgent.notificationRecipient;
- // const { error } = await sessionAgent.serverWorker.emit("debug", { to });
- // res.send(error ? error.message : `Your request was successful: the server captured and compressed (but did not save) a new back up. It was sent to ${to}.`);
- // })
- // });
+ register({
+ method: Method.GET,
+ subscription: this.secureSubscriber("debug", "to?"),
+ secureHandler: this.authorizedAction(async ({ req: { params }, res }) => {
+ const to = params.to || DashSessionAgent.notificationRecipient;
+ const { error } = await sessionAgent.serverWorker.emit("debug", { to });
+ res.send(error ? error.message : `Your request was successful: the server captured and compressed (but did not save) a new back up. It was sent to ${to}.`);
+ })
+ });
register({
method: Method.GET,