change return of addAmount in baruser for new frontend

This commit is contained in:
Tim Gröger 2020-01-14 20:00:37 +01:00
parent d0a9345d68
commit e42a97eca4
1 changed files with 3 additions and 1 deletions

View File

@ -75,8 +75,10 @@ def _baradd():
type = 'credit' type = 'credit'
else: else:
type = 'amount' type = 'amount'
dic = user.toJSON()
dic['amount'] = abs(all)
return jsonify({"userId": user.uid, "amount": abs(all), 'locked': user.locked, 'type': type}) return jsonify(dic)
return jsonify({"error", "permission denied"}), 401 return jsonify({"error", "permission denied"}), 401
@baruser.route("/barGetUsers") @baruser.route("/barGetUsers")