fix drinks

Took 4 minutes
This commit is contained in:
Tobias Hopp 2022-11-28 11:13:14 +01:00
parent 4a20a9bc9e
commit 536de17d31
2 changed files with 3 additions and 2 deletions

View File

@ -239,7 +239,7 @@ export class iTender {
for (let i of d.ingredients) {
let c = await Container.findOne({content: i.type});
if (!c || c.content != i.type) {
if (!c) {
drinkAccept = false;
break;
}

View File

@ -65,9 +65,10 @@ function init(): Promise<void> {
await iTender.checkNetwork();
let drinkCount = await Drink.countDocuments({});
if (iTender.internetConnection && iTender.status == iTenderStatus.READY && drinkCount < 3 ) {
console.log("No drinks in the database. - Try to refresh from server...")
await iTender.refreshFromServer();
}
}, 1000 * 20 ) ;
}, 1000 * 15 ) ;
// Containers