Add get all data scope rules interface (#647)

This commit is contained in:
Wu Clan
2025-05-31 23:09:26 +08:00
committed by GitHub
parent 86d9efd785
commit 33ebc5723f
3 changed files with 26 additions and 0 deletions
@@ -22,6 +22,12 @@ from backend.database.db import CurrentSession
router = APIRouter()
@router.get('/all', summary='获取所有数据范围', dependencies=[DependsJwtAuth])
async def get_all_data_scope() -> ResponseSchemaModel[list[GetDataScopeDetail]]:
data = await data_scope_service.get_all()
return response_base.success(data=data)
@router.get('/{pk}', summary='获取数据范围详情', dependencies=[DependsJwtAuth])
async def get_data_scope(
pk: Annotated[int, Path(description='数据范围 ID')],