feat: end-point for deal document generation
This commit is contained in:
@@ -189,6 +189,20 @@ async def get_deal_document(
|
||||
pdf_file: BytesIO = await BillingService(session).create_billing_document_pdf(deal_id)
|
||||
return Response(pdf_file.getvalue(), media_type='application/pdf')
|
||||
|
||||
|
||||
@deal_router.get(
|
||||
'/detailedDocument/{deal_id}',
|
||||
operation_id='get_deal_document_detailed',
|
||||
# dependencies=[Depends(authorized_user)],
|
||||
)
|
||||
async def get_detailed_deal_document(
|
||||
deal_id: int,
|
||||
session: Annotated[AsyncSession, Depends(get_session)],
|
||||
):
|
||||
pdf_file: BytesIO = await DealService(session).create_detailed_deal_document_pdf(deal_id)
|
||||
return Response(pdf_file.getvalue(), media_type='application/pdf')
|
||||
|
||||
|
||||
# endregion
|
||||
|
||||
# region Deal services
|
||||
|
||||
Reference in New Issue
Block a user