fix drinks
Took 4 minutes
This commit is contained in:
parent
4a20a9bc9e
commit
536de17d31
@ -239,7 +239,7 @@ export class iTender {
|
|||||||
for (let i of d.ingredients) {
|
for (let i of d.ingredients) {
|
||||||
let c = await Container.findOne({content: i.type});
|
let c = await Container.findOne({content: i.type});
|
||||||
|
|
||||||
if (!c || c.content != i.type) {
|
if (!c) {
|
||||||
drinkAccept = false;
|
drinkAccept = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -65,9 +65,10 @@ function init(): Promise<void> {
|
|||||||
await iTender.checkNetwork();
|
await iTender.checkNetwork();
|
||||||
let drinkCount = await Drink.countDocuments({});
|
let drinkCount = await Drink.countDocuments({});
|
||||||
if (iTender.internetConnection && iTender.status == iTenderStatus.READY && drinkCount < 3 ) {
|
if (iTender.internetConnection && iTender.status == iTenderStatus.READY && drinkCount < 3 ) {
|
||||||
|
console.log("No drinks in the database. - Try to refresh from server...")
|
||||||
await iTender.refreshFromServer();
|
await iTender.refreshFromServer();
|
||||||
}
|
}
|
||||||
}, 1000 * 20 ) ;
|
}, 1000 * 15 ) ;
|
||||||
|
|
||||||
|
|
||||||
// Containers
|
// Containers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user