diff options
author | Sebastian Reichel <sre@ring0.de> | 2013-05-03 20:35:57 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2013-05-03 20:35:57 +0200 |
commit | 2e03e55a302033bf158c27bbb5c1e61fef7d9f4b (patch) | |
tree | 77c691264a6dd0fae7f2c6ac602850e68ee38b1a /src/web/web.vala | |
parent | eaf45993fad6341800bb02b1f99595f0bc06fb25 (diff) | |
download | serial-barcode-scanner-2e03e55a302033bf158c27bbb5c1e61fef7d9f4b.tar.bz2 |
web: database.restock() is void
Diffstat (limited to 'src/web/web.vala')
-rw-r--r-- | src/web/web.vala | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/web/web.vala b/src/web/web.vala index 8d39153..2d5ea4f 100644 --- a/src/web/web.vala +++ b/src/web/web.vala @@ -654,16 +654,15 @@ public class WebServer { } if(amount >= 1 && price >= 1) { - if(db.restock(session.user, id, amount, price, supplier, bbd.to_unix())) { - template.replace("AMOUNT", @"$amount"); - template.replace("PRICE", @"$price"); - template.replace("BESTBEFORE", bbd.format("%Y-%m-%d")); - template.replace("SUPPLIER", db.get_supplier(supplier).name); - template.replace("RESTOCK.OK", "block"); - template.replace("RESTOCK.FAIL", "none"); - msg.set_response("text/html", Soup.MemoryUse.COPY, template.data); - return; - } + db.restock(session.user, id, amount, price, supplier, bbd.to_unix()); + template.replace("AMOUNT", @"$amount"); + template.replace("PRICE", @"$price"); + template.replace("BESTBEFORE", bbd.format("%Y-%m-%d")); + template.replace("SUPPLIER", db.get_supplier(supplier).name); + template.replace("RESTOCK.OK", "block"); + template.replace("RESTOCK.FAIL", "none"); + msg.set_response("text/html", Soup.MemoryUse.COPY, template.data); + return; } } |