You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a schema set up where anytime someone fully completes registering (as there are 3 separate parts to it with the final being an admin approval) there are many things Mongo-side that need to be completed. I see in events where I can listen to the before save event, however the event only has the new doc in it.
I do not want to run this code every time a user is updated as it can take a little bit, however I do not see where I can check to see (based on a boolean value in the doc) whether they were not finished registering before and are now. Is this possible?
Something like the following is what I am looking for:
I know the above isn't how you would actually do it, its just for demonstration. In helpers, this points to the current doc, but in events it seems to point to the server environment. Any help would be appreciated!
The text was updated successfully, but these errors were encountered:
I have a schema set up where anytime someone fully completes registering (as there are 3 separate parts to it with the final being an admin approval) there are many things Mongo-side that need to be completed. I see in events where I can listen to the before save event, however the event only has the new doc in it.
I do not want to run this code every time a user is updated as it can take a little bit, however I do not see where I can check to see (based on a boolean value in the doc) whether they were not finished registering before and are now. Is this possible?
Something like the following is what I am looking for:
I know the above isn't how you would actually do it, its just for demonstration. In helpers,
this
points to the current doc, but in events it seems to point to the server environment. Any help would be appreciated!The text was updated successfully, but these errors were encountered: