fix(Blueprints) way of api
Now /api is creating reverse proxy
This commit is contained in:
1 parent
5596c20056
commit
b20eb2ed0c
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ from db.handlers.catigory_handler import get_all_categories_with_attributes, get
|
|||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
# Создаем blueprint для API
|
# Создаем blueprint для API
|
||||||
api_category = Blueprint('api_category', __name__, url_prefix='/api/categories')
|
api_category = Blueprint('api_category', __name__, url_prefix='/categories')
|
||||||
|
|
||||||
@api_category.route('/', methods=['GET'])
|
@api_category.route('/', methods=['GET'])
|
||||||
def get_categories():
|
def get_categories():
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ from utils.mail import send_lead_to_email
|
|||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
# Создаем blueprint для API
|
# Создаем blueprint для API
|
||||||
api_email = Blueprint('api_email', __name__, url_prefix='/api/email')
|
api_email = Blueprint('api_email', __name__, url_prefix='/email')
|
||||||
|
|
||||||
@api_email.route('/', methods=['POST'])
|
@api_email.route('/', methods=['POST'])
|
||||||
def post_email():
|
def post_email():
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ from db.handlers.product_handler import get_products_with_filters, get_product_b
|
|||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
# Создаем blueprint для API
|
# Создаем blueprint для API
|
||||||
api_product = Blueprint('api_product', __name__, url_prefix='/api/products')
|
api_product = Blueprint('api_product', __name__, url_prefix='/products')
|
||||||
|
|
||||||
@api_product.route('/', methods=['GET'])
|
@api_product.route('/', methods=['GET'])
|
||||||
def get_products():
|
def get_products():
|
||||||
|
|||||||
Reference in new issue
Block a user