Get FreeDrinkTypes und Bugfix
Alle Freigetränktypen können nun geladen werden. Es wurde ein Bug gefixed, sodass die Preisliste wieder geladen werden kann.
This commit is contained in:
parent
4a69d54660
commit
2f2fdacca2
|
@ -11,7 +11,7 @@ class Base:
|
|||
retVal = cursor.fetchall()
|
||||
for data in retVal:
|
||||
data['drink_type'] = self.getDrinkType(data['type'])
|
||||
return cursor.fetchall()
|
||||
return retVal
|
||||
except Exception as err:
|
||||
traceback.print_exc()
|
||||
self.db.connection.rollback()
|
||||
|
|
|
@ -26,3 +26,6 @@ class Base:
|
|||
|
||||
def get_free_drink_list_reasons(self):
|
||||
return db.get_free_drink_list_reasons()
|
||||
|
||||
def get_free_drink_types(self):
|
||||
return db.get_free_drink_list_types()
|
|
@ -81,6 +81,17 @@ def _free_drink_list_reasons(**kwargs):
|
|||
debug.warning("exception in delete free_dirnk_list_reasons.", exc_info=True)
|
||||
return jsonify({"error": str(err)}), 500
|
||||
|
||||
@app.route("/freeDrinkTypes", methods=['GET', 'POST'])
|
||||
@login_required()
|
||||
def _free_drink_types(**kwargs):
|
||||
try:
|
||||
debug.info("get free_drnik_types")
|
||||
retVal = mainController.get_free_drink_types()
|
||||
return jsonify(retVal)
|
||||
except Exception as err:
|
||||
debug.warning("exception in free_dirnk_types.", exc_info=True)
|
||||
return jsonify({"error": str(err)}), 500
|
||||
|
||||
@app.route("/pricelist", methods=['GET'])
|
||||
def _getPricelist():
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue