Skip to content

Commit

Permalink
formating
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Oct 8, 2023
1 parent 190ebd6 commit f34ebdc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ class SocketServer extends EventEmitter {
}

async send(data) {
// const socket = this.sockets.get(data.socketId)
const socket = data.socket

if (data.sync) {
Expand All @@ -339,16 +340,14 @@ class SocketServer extends EventEmitter {
socket.send(JSON.stringify(data.object[i].data));
}
} else {

// const socket = this.sockets.get(data.socketId)
const sent = []

const authorized = await this.authorize.check(data, socket.user_id)
if (authorized && authorized.authorized)
data = authorized.authorized

if (!data.method.startsWith('read.') || data.log) {
let object = { url: socket.socketUrl, data } // could store data._id for crud
let object = { url: socket.socketUrl, data }
delete object.socket
this.emit('create.object', {
method: 'create.object',
Expand Down

0 comments on commit f34ebdc

Please sign in to comment.