mirror of
https://github.com/karl0ss/orvibo-b25-server-kex.git
synced 2025-04-29 12:53:40 +01:00
clean up
This commit is contained in:
parent
9bd84d9fb4
commit
c129d42a34
@ -5,7 +5,7 @@ const app = express();
|
|||||||
app.set('view engine', 'pug');
|
app.set('view engine', 'pug');
|
||||||
app.use(express.static(__dirname + '/server'));
|
app.use(express.static(__dirname + '/server'));
|
||||||
|
|
||||||
const createArray = str => {
|
const plugArray = str => {
|
||||||
const arr = str.split(',');
|
const arr = str.split(',');
|
||||||
const pairs = [];
|
const pairs = [];
|
||||||
for (let i=0; i<arr.length; i+=2) {
|
for (let i=0; i<arr.length; i+=2) {
|
||||||
@ -21,7 +21,7 @@ const settings = {
|
|||||||
LOG_PACKET: true, //Show incoming packet data from the socket
|
LOG_PACKET: true, //Show incoming packet data from the socket
|
||||||
ORVIBO_KEY: process.env.orviboPK,
|
ORVIBO_KEY: process.env.orviboPK,
|
||||||
plugInfo :
|
plugInfo :
|
||||||
createArray(process.env.plugArray)
|
plugArray(process.env.plugArray)
|
||||||
,
|
,
|
||||||
};
|
};
|
||||||
let orvibo = new Orvibo(settings);
|
let orvibo = new Orvibo(settings);
|
||||||
@ -58,7 +58,7 @@ app.get('/', (req, res) => {
|
|||||||
let sockets = orvibo.getConnectedSocket();
|
let sockets = orvibo.getConnectedSocket();
|
||||||
|
|
||||||
const q = req.query
|
const q = req.query
|
||||||
if (q.uid != null) {
|
if (q.uid != undefined) {
|
||||||
orvibo.toggleSocket(q.uid);
|
orvibo.toggleSocket(q.uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user