Updated claude big changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
from flask import jsonify
|
||||
from app.money import money
|
||||
from app import db
|
||||
from app.common.responses import success_response
|
||||
import datetime
|
||||
from datetime import date
|
||||
from app.classes.money import Money_delivery, Money_delivery_schema
|
||||
@@ -47,10 +47,10 @@ def total_profit_week():
|
||||
total_deliveries = total_deliveries + 1
|
||||
|
||||
|
||||
return jsonify({"ok": True,
|
||||
'total_profit': total_profit,
|
||||
'total_deliveries': total_deliveries
|
||||
}), 200
|
||||
return success_response({
|
||||
'total_profit': total_profit,
|
||||
'total_deliveries': total_deliveries
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -70,9 +70,7 @@ def total_profit_year():
|
||||
.all())
|
||||
for f in get_total:
|
||||
total_profit = total_profit + f.total_profit
|
||||
return jsonify({"ok": True,
|
||||
'total': total_profit
|
||||
}), 200
|
||||
return success_response({'total': total_profit})
|
||||
|
||||
|
||||
@money.route("/<int:delivery_id>", methods=["GET"])
|
||||
@@ -86,4 +84,4 @@ def get_money_delivery(delivery_id):
|
||||
.first())
|
||||
|
||||
money_schema = Money_delivery_schema(many=False)
|
||||
return jsonify(money_schema.dump(profit))
|
||||
return success_response({"profit": money_schema.dump(profit)})
|
||||
|
||||
Reference in New Issue
Block a user