major claude changes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
from flask import jsonify
|
||||
from decimal import Decimal
|
||||
from app.info import info
|
||||
@@ -6,10 +7,15 @@ from app.classes.pricing import Pricing_Oil_Oil, Pricing_Oil_Oil_schema
|
||||
from app.classes.admin import Admin_Company
|
||||
from app.classes.delivery import Delivery_Delivery
|
||||
from app.classes.service import Service_Service
|
||||
from flask_login import login_required
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@info.route("/price/oil/tiers", methods=["GET"])
|
||||
@login_required
|
||||
def get_pricing_tiers():
|
||||
logger.info("GET /info/price/oil/tiers - Fetching oil pricing tiers")
|
||||
get_price_query = (db.session
|
||||
.query(Pricing_Oil_Oil)
|
||||
.order_by(Pricing_Oil_Oil.date.desc())
|
||||
@@ -34,7 +40,9 @@ def get_pricing_tiers():
|
||||
return jsonify(pricing_totals)
|
||||
|
||||
@info.route("/price/oil", methods=["GET"])
|
||||
@login_required
|
||||
def get_oil_price_today():
|
||||
logger.info("GET /info/price/oil - Fetching current oil prices")
|
||||
get_price_query = (db.session
|
||||
.query(Pricing_Oil_Oil)
|
||||
.order_by(Pricing_Oil_Oil.date.desc())
|
||||
@@ -50,7 +58,9 @@ def get_oil_price_today():
|
||||
|
||||
|
||||
@info.route("/price/oil/table", methods=["GET"])
|
||||
@login_required
|
||||
def get_pricing():
|
||||
logger.info("GET /info/price/oil/table - Fetching oil pricing table")
|
||||
get_price_query = (db.session
|
||||
.query(Pricing_Oil_Oil)
|
||||
.order_by(Pricing_Oil_Oil.date.desc())
|
||||
@@ -63,7 +73,9 @@ def get_pricing():
|
||||
|
||||
|
||||
@info.route("/company", methods=["GET"])
|
||||
@login_required
|
||||
def get_company():
|
||||
logger.info("GET /info/company - Fetching company information")
|
||||
get_data_company = (db.session
|
||||
.query(Admin_Company)
|
||||
.first())
|
||||
|
||||
Reference in New Issue
Block a user