feat: deal attributes editing
This commit is contained in:
@ -76,3 +76,34 @@ async def get_attribute_types(
|
||||
session: SessionDependency,
|
||||
):
|
||||
return await AttributeService(session).get_attribute_types()
|
||||
|
||||
|
||||
@router.get(
|
||||
"/deal/{dealId}/module/{moduleId}",
|
||||
response_model=GetDealModuleAttributesResponse,
|
||||
operation_id="get_deal_module_attributes",
|
||||
)
|
||||
async def get_deal_module_attributes(
|
||||
session: SessionDependency,
|
||||
deal_id: int = Path(alias="dealId"),
|
||||
module_id: int = Path(alias="moduleId"),
|
||||
):
|
||||
return await AttributeService(session).get_deal_module_attributes(
|
||||
deal_id, module_id
|
||||
)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/deal/{dealId}/module/{moduleId}",
|
||||
response_model=UpdateDealModuleAttributesResponse,
|
||||
operation_id="update_deal_module_attributes",
|
||||
)
|
||||
async def update_deal_module_attributes(
|
||||
session: SessionDependency,
|
||||
request: UpdateDealModuleAttributesRequest,
|
||||
deal_id: int = Path(alias="dealId"),
|
||||
module_id: int = Path(alias="moduleId"),
|
||||
):
|
||||
return await AttributeService(session).update_deal_module_attributes(
|
||||
deal_id, module_id, request
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user