M
M
Misha Kogan2015-08-23 10:57:54
Node.js
Misha Kogan, 2015-08-23 10:57:54

Is it possible to get a User from a session without a req object?

The essence of the problem is this, there is an event handler, when the action is performed, the following code occurs

var newItem = new Item();
                    newItem.item.name = item.name;
                    newItem.item.description = item.description;
                    newItem.item.itemsCount = count;

I add an object to the mongo database, I would also like to add the submittedBy field with the name of the current user, but I can’t figure out how to pull it out and is it even possible?
If this is not possible, then in which direction to look? What is the best way to realize this moment?
Thanks in advance for all replies.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question