From 19860974fe4f64a9e64d616fdb62a85c1e6b6316 Mon Sep 17 00:00:00 2001 From: t123yh Date: Wed, 23 Aug 2017 20:08:50 +0800 Subject: [PATCH] Change pushType location. --- src/daemon-frontend-syzoj/socketio.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon-frontend-syzoj/socketio.ts b/src/daemon-frontend-syzoj/socketio.ts index b003f51..0b38db1 100644 --- a/src/daemon-frontend-syzoj/socketio.ts +++ b/src/daemon-frontend-syzoj/socketio.ts @@ -115,7 +115,7 @@ export function initializeSocketIO(s: http.Server) { let req; try { req = jwt.verify(reqJwt, Cfg.token); - if (req.displayConfig.pushType !== 'rough') { + if (req.type !== 'rough') { throw new Error("Permission denied"); } clientList[socket.id] = req.displayConfig; @@ -159,7 +159,7 @@ export function initializeSocketIO(s: http.Server) { let req; try { req = jwt.verify(reqJwt, Cfg.token); - if (req.displayConfig.pushType !== 'compile') { + if (req.type !== 'compile') { throw new Error("Request type in token mismatch."); } } catch (err) {