work command + income-role fix

This commit is contained in:
SowinskiBraeden committed 2022-07-27 15:10:28 -07:00
1 parent 5db634f9cd
commit 5f051a15e0
4 files changed
+114 -10

No files matched your search

+3 -4
View File
@@ -4,8 +4,7 @@ let inventorySchema = mongoose.Schema({
inventory: {
userID: String,
items: [],
createdAt: Date,
updatedAt: Date
lastWork: Date,
}
});
@@ -24,8 +23,8 @@ inventorySchema.methods.createInventory = function (userID) {
}
}
this.inventory.items.push(walletData);
this.inventory.createdAt = new Date();
};
this.inventory.lastWork = new Date('2000-01-01T00:00:00'); // garantee's they can work right after inventory create
};
inventorySchema.methods.addItem = function (item) {
this.inventory.items.push(item);