notherbase-fs 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controllers/chat.js +2 -2
- package/controllers/inventory.js +1 -1
- package/package.json +1 -1
package/controllers/chat.js
CHANGED
|
@@ -6,9 +6,9 @@ const getRouterWithIO = function getRouterWithIO(io) {
|
|
|
6
6
|
try {
|
|
7
7
|
//const foundAccount = await User.findOne({ _id: req.session.currentUser });
|
|
8
8
|
|
|
9
|
-
if (req.session.
|
|
9
|
+
if (req.session.currentUser) {
|
|
10
10
|
io.to(req.body.room).emit('chat message', {
|
|
11
|
-
name: req.session.
|
|
11
|
+
name: req.session.currentUser,
|
|
12
12
|
time: Date.now(),
|
|
13
13
|
text: req.body.text
|
|
14
14
|
});
|
package/controllers/inventory.js
CHANGED
|
@@ -29,7 +29,7 @@ router.get("/", async function(req, res) {
|
|
|
29
29
|
router.post("/", async function(req, res) {
|
|
30
30
|
if (connectionSuccess) {
|
|
31
31
|
try {
|
|
32
|
-
if (req.session.
|
|
32
|
+
if (req.session.currentUser) {
|
|
33
33
|
let foundInventory = await inventory.findOne({user: req.session.currentUser}).populate("items.item");
|
|
34
34
|
|
|
35
35
|
let holding = false;
|