Skip to content

Commit

Permalink
fix: socket and limit handling
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Feb 15, 2024
1 parent 9cc1c2f commit b700208
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ class CoCreateUser {
data.object = { '$pull.invitations': data.token, '$pull.members': data.email }
data.$filter = {
query: {
// invites: { $in: [data.token] },
// invitations: { $in: [data.token] },
members: { $in: [data.email] },
limit: 1
limit: 2
}
}

Expand All @@ -282,7 +282,6 @@ class CoCreateUser {
for (let object of data.object) {
if (object._id) {
delete data.$filter
data.socket = socket
data.object = { _id: object._id, '$addToSet.members': data.user_id }
data = await this.crud.send(data)
this.crud.send({ method: 'object.update', host: data.host, array: 'users', object: { _id: data.user_id, memberAccount: object._id, subscription: '6571fe530c48ef6970900a82' } })
Expand Down

0 comments on commit b700208

Please sign in to comment.