mirror of
https://github.com/karl0ss/orvibo-b25-server-kex.git
synced 2025-04-29 12:53:40 +01:00
fixing
This commit is contained in:
parent
c129d42a34
commit
57ff3dbf6a
12
server.js
12
server.js
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user