fix(api): fix http respons and bad way

This commit is contained in:
Black_Raven committed 2026-04-06 21:04:25 +03:00
1 parent 13fcc233ff
commit 0dc9034f19
4 files changed
+9 -6

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ from flask import Blueprint
# Создаем blueprint для API
api_category = Blueprint('api_category', __name__, url_prefix='/categories')
@api_category.route('/', methods=['GET'])
@api_category.route('/', methods=['GET'], strict_slashes=False)
def get_categories():
"""
Получение всех категорий с атрибутами
@@ -17,7 +17,7 @@ def get_categories():
except Exception as e:
return jsonify({"error": str(e)}), 500
@api_category.route('/<int:category_id>', methods=['GET'])
@api_category.route('/<int:category_id>', methods=['GET'], strict_slashes=False)
def get_category(category_id):
"""
Получение категории по ID