Hi, I am trying to build some kind of server side logic because of security reasons.
This is the UI we are looking for:
Image1
The green button means that the event contains “currentUser.objectId”.
This is the database structure:
Image2
And this is the logic I am trying to build:
Image3
My questions are:
-
How can I achieve the If block in the image 3 without having to load all object Id’s of other users stored in “registered_users”?
-
Is it possible to do all the logic on the server and simply send a response like:
If currentUser is stored in registered_users
[object]
-event_name: “Musik Concert”
-registered_users: [{}]
–objectId: “currentUser.objectId”
If currentUser is not stored in registered_users
[object]
-event_name: “Musik Concert”
-registered_users: [{}]
–objectId: null
Even if there are other users registered but not the current user?