Oprava stahování pizz pro Pizza day
This commit is contained in:
1 parent
e78f9cfd3a
commit
45bd84f96f
3 files changed
+11
-4
No files matched your search
+1
-2
@@ -152,8 +152,7 @@ app.post("/api/addPizza", async (req, res) => {
|
||||
const pizzaSizeIndex = req.body.pizzaSizeIndex;
|
||||
let pizzy = await getPizzaList();
|
||||
if (!pizzy) {
|
||||
pizzy = await downloadPizzy();
|
||||
savePizzaList(pizzy);
|
||||
throw Error("Selhalo získání seznamu dostupných pizz.");
|
||||
}
|
||||
if (!pizzy[pizzaIndex]) {
|
||||
throw Error("Neplatný index pizzy: " + pizzaIndex);
|
||||
|
||||
Reference in new issue
Block a user