mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-25 19:26:12 +10:00
make sure it's actual data now..
This commit is contained in:
@@ -15,6 +15,8 @@ module.exports = {
|
|||||||
wss.on('connection', function connection(ws) {
|
wss.on('connection', function connection(ws) {
|
||||||
ws.on('message', function incoming(message) {
|
ws.on('message', function incoming(message) {
|
||||||
console.log('received: %s', message);
|
console.log('received: %s', message);
|
||||||
|
|
||||||
|
try {
|
||||||
var data = parse(message)
|
var data = parse(message)
|
||||||
|
|
||||||
var response = {
|
var response = {
|
||||||
@@ -36,6 +38,11 @@ module.exports = {
|
|||||||
|
|
||||||
ws.send(response)
|
ws.send(response)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
ws.send('Connected');
|
ws.send('Connected');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user