feat: nested department sections, attaching department sections in the user editor

This commit is contained in:
2025-01-19 12:01:10 +04:00
parent 43a95ef75c
commit b8947ce68e
7 changed files with 198 additions and 32 deletions

View File

@@ -59,6 +59,17 @@ async def delete_department(
return await DepartmentService(session).delete_department(department_id)
@department_router.get(
"/section",
operation_id="get_sections",
response_model=GetDepartmentSectionsResponse,
)
async def get_sections(
session: SessionDependency,
):
return await DepartmentService(session).get_sections()
@department_router.post(
"/section",
operation_id="create_section",