加密后
This commit is contained in:
@ -2,6 +2,7 @@ from fastapi import APIRouter, Query, Path
|
||||
from mysql.connector import Error as MySQLError
|
||||
|
||||
from ds.db import db
|
||||
from encryption.encrypt_decorator import encrypt_response
|
||||
from schema.device_action_schema import (
|
||||
DeviceActionCreate,
|
||||
DeviceActionResponse,
|
||||
@ -62,6 +63,7 @@ def add_device_action(action_data: DeviceActionCreate) -> DeviceActionResponse:
|
||||
# 接口: 分页查询操作记录列表(仅返回 total + device_actions)
|
||||
# ------------------------------
|
||||
@router.get("/list", response_model=APIResponse, summary="分页查询设备操作记录")
|
||||
@encrypt_response()
|
||||
async def get_device_action_list(
|
||||
page: int = Query(1, ge=1, description="页码、默认1"),
|
||||
page_size: int = Query(10, ge=1, le=100, description="每页条数、1-100"),
|
||||
@ -119,6 +121,7 @@ async def get_device_action_list(
|
||||
|
||||
|
||||
@router.get("/{client_ip}", response_model=APIResponse, summary="根据IP查询设备操作记录")
|
||||
@encrypt_response()
|
||||
async def get_device_actions_by_ip(
|
||||
client_ip: str = Path(..., description="客户端IP地址")
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user