Skip to content

Commit

Permalink
fix: temp updateDB solution
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Feb 16, 2024
1 parent c20dc91 commit 40d3db1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,12 @@ class CoCreateUser {
data.method = 'object.update'
data.array = "users"
data.object = { _id: data.user_id, '$push.invitations': inviteId, '$addToSet.members': data.email }

// TODO: upodateDB is a temp solution to by pass crud.sync clientId as all crud methods are ignored fro same clientid except for read
data.updateDB = true

data = await this.crud.send(data)
data.database = data.organization_id


let invitee = await this.crud.send({
method: 'object.read',
Expand Down Expand Up @@ -263,11 +266,14 @@ class CoCreateUser {
data.$filter = {
query: {
invitations: { $in: [data.token] },
members: { $in: [data.email] },
limit: 2
}
members: { $in: [data.email] }
},
limit: 2
}

// TODO: upodateDB is a temp solution to by pass crud.sync clientId as all crud methods are ignored fro same clientid except for read
data.updateDB = true

data = await this.crud.send(data)

let response = {
Expand Down

0 comments on commit 40d3db1

Please sign in to comment.