Added price for service
This commit is contained in:
@@ -25,14 +25,12 @@ def get_pricing_tiers():
|
||||
gallon_tiers = [100, 125, 150, 175, 200, 220]
|
||||
|
||||
# Calculate the total price for each gallon amount by multiplication
|
||||
# e.g., { 100: (2.92 * 100), 125: (2.92 * 125), ... }
|
||||
pricing_totals = {
|
||||
gallons: price_per_gallon * gallons
|
||||
for gallons in gallon_tiers
|
||||
}
|
||||
|
||||
# Return the dictionary of totals
|
||||
# e.g., { "100": "292.00", "125": "365.00", ... }
|
||||
return jsonify(pricing_totals)
|
||||
|
||||
@info.route("/price/oil", methods=["GET"])
|
||||
|
||||
Reference in New Issue
Block a user