Skip to content

Commit

Permalink
fix: applied host to define environment/branch
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jan 8, 2024
1 parent 88108e5 commit fad44e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class SocketServer extends EventEmitter {

this.emit('object.update', {
method: 'object.update',
host: socket.host,
array: 'organizations',
object: {
_id: organization_id, ['$addToSet.activeHost']: socket.socketUrl // needs socketId
Expand Down Expand Up @@ -244,6 +245,7 @@ class SocketServer extends EventEmitter {
this.organizations.delete(socket.organization_id);
this.emit('object.update', {
method: 'object.update',
host: socket.host,
array: 'organizations',
object: {
_id: organization_id, ['$pull.activeHost']: socket.socketUrl
Expand Down Expand Up @@ -358,6 +360,7 @@ class SocketServer extends EventEmitter {
}

data.socket = socket
data.host = socket.host

const authorized = await this.authorize.check(data, socket.user_id)
let errors = {}
Expand Down

0 comments on commit fad44e5

Please sign in to comment.