This commit is contained in:
QuangMinh_123
2026-05-27 13:50:27 +07:00
parent 7aebcf9567
commit 2683cdb882
30 changed files with 2091 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
# pyrefly: ignore [missing-import]
from flask import Blueprint
from modules.device.controller import (
get_devices,
get_device_by_id,
create_device,
update_device,
delete_device
)
# Khởi tạo Blueprint cho Module Device
device_bp = Blueprint("device", __name__)
# Đăng ký các endpoints với controller tương ứng
device_bp.route("", methods=["GET"])(get_devices)
device_bp.route("/<device_id>", methods=["GET"])(get_device_by_id)
device_bp.route("", methods=["POST"])(create_device)
device_bp.route("/<device_id>", methods=["PUT"])(update_device)
device_bp.route("/<device_id>", methods=["DELETE"])(delete_device)