Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge branch 'development' of https://github.com/roughnecks/ZED into …
Browse files Browse the repository at this point in the history
…development
  • Loading branch information
roughnecks committed Mar 26, 2019
2 parents 784fcf8 + b0597c8 commit ee5aa66
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@ const _db = {
var itemsAdded = 0;

for (let inventoryItem of inventoryItems) {
var dbItemsCount = await this.db.collection('inventory_items').find({ assetId: inventoryItem.assetid }).count();
if (dbItemsCount === 0) {
await this.insertInventoryItem(inventoryItem);
await helpers.sleep(2500);
itemsAdded++;
if (!config.lockedItems.some(x => x === inventoryItem.name)) {
if (await this.db.collection('inventory_items').find({ assetId: inventoryItem.assetid }).count() === 0) {
await this.insertInventoryItem(inventoryItem);
await helpers.sleep(2500);
itemsAdded++;
}
}
}

Expand Down

0 comments on commit ee5aa66

Please sign in to comment.