mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 13:13:09 +00:00
refactor(api): 统一更新接口使用路径参数传递ID
refactor(backend): 重构CRUD基类查询方法去除重复结果 feat(application): 新增应用系统模块基础结构 fix(backend): 修复多处日志记录ID变量名错误 style(backend): 清理无用代码和注释 fix(frontend): 修复用户导入功能参数错误 docs(backend): 更新环境配置示例注释 perf(backend): 优化导出功能数据处理逻辑 test(frontend): 添加任务日志功能开发中提示 chore: 更新角色菜单权限数据
This commit is contained in:
@@ -54,12 +54,13 @@ async def create_obj_controller(
|
||||
return SuccessResponse(data=result_dict, msg="创建部门成功")
|
||||
|
||||
|
||||
@DeptRouter.put("/update", summary="修改部门", description="修改部门")
|
||||
@DeptRouter.put("/update/{id}", summary="修改部门", description="修改部门")
|
||||
async def update_obj_controller(
|
||||
data: DeptUpdateSchema,
|
||||
id: int = Path(..., description="部门ID"),
|
||||
auth: AuthSchema = Depends(AuthPermission(permissions=["system:dept:update"]))
|
||||
) -> JSONResponse:
|
||||
result_dict = await DeptService.update_dept_service(data=data, auth=auth)
|
||||
result_dict = await DeptService.update_dept_service(auth=auth, id=id, data=data)
|
||||
logger.info(f"修改部门成功: {result_dict}")
|
||||
return SuccessResponse(data=result_dict, msg="修改部门成功")
|
||||
|
||||
@@ -70,7 +71,7 @@ async def delete_obj_controller(
|
||||
auth: AuthSchema = Depends(AuthPermission(permissions=["system:dept:delete"]))
|
||||
) -> JSONResponse:
|
||||
await DeptService.delete_dept_service(ids=ids, auth=auth)
|
||||
logger.info(f"删除部门成功: {id}")
|
||||
logger.info(f"删除部门成功: {ids}")
|
||||
return SuccessResponse(msg="删除部门成功")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user