mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 02:36:11 +10:00
stringify message with flatted
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
const fs = require('fs');
|
||||
const https = require('https');
|
||||
const WebSocket = require('ws');
|
||||
|
||||
|
||||
const { parse, stringify } = require('flatted/cjs');
|
||||
|
||||
module.exports = {
|
||||
name: "Websockets Server (8080)",
|
||||
@@ -42,7 +41,7 @@ module.exports = {
|
||||
}))
|
||||
|
||||
dclient.on('message', (message) => {
|
||||
ws.send(message.cleanContent)
|
||||
ws.send(stringify(message))
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user