This commit is contained in:
karl0ss 2019-07-15 23:18:30 +01:00
parent c129d42a34
commit 57ff3dbf6a

View File

@ -56,12 +56,7 @@ orvibo.startServer();
app.get('/', (req, res) => { app.get('/', (req, res) => {
let sockets = orvibo.getConnectedSocket(); let sockets = orvibo.getConnectedSocket();
const q = req.query
if (q.uid != undefined) {
orvibo.toggleSocket(q.uid);
}
sockets.forEach(socket => { sockets.forEach(socket => {
switch(socket.state) { switch(socket.state) {
case 1: case 1:
@ -74,6 +69,11 @@ app.get('/', (req, res) => {
} }
}); });
const q = req.query
if (q.uid != undefined) {
orvibo.toggleSocket(q.uid);
}
res.render('index', { res.render('index', {
title: 'Orvibo b25 Server', title: 'Orvibo b25 Server',
sockets sockets