feat: attributes in cards and projects

This commit is contained in:
2025-02-27 18:34:38 +04:00
parent c6c006d45b
commit a2c9fd8e3b
16 changed files with 391 additions and 27 deletions

View File

@@ -63,3 +63,38 @@ async def delete_project(
project_id: int,
):
return await ProjectService(session).delete_project(project_id)
@project_router.get(
"/modules",
response_model=GetAllModulesResponse,
operation_id="get_all_modules",
)
async def get_all_modules(
session: Annotated[AsyncSession, Depends(get_session)],
):
return await ProjectService(session).get_all_modules()
@project_router.post(
"/modules",
response_model=UpdateModulesResponse,
operation_id="update_project_modules",
)
async def update_project_modules(
session: Annotated[AsyncSession, Depends(get_session)],
request: UpdateModulesRequest,
):
return await ProjectService(session).update_project_modules(request)
@project_router.post(
"/attributes",
response_model=UpdateAttributesResponse,
operation_id="update_project_attributes",
)
async def update_project_attributes(
session: Annotated[AsyncSession, Depends(get_session)],
request: UpdateAttributesRequest,
):
return await ProjectService(session).update_project_attributes(request)