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) {