feat:add get last record

This commit is contained in:
shahzeydyfah
2024-06-17 10:12:07 +03:30
parent 849512b390
commit 029143e456
2 changed files with 17 additions and 0 deletions
+5
View File
@@ -19,6 +19,11 @@ repo = BillRepository()
def create(coding: ThisModel = Body(...)):
pass
@router.get('last/{contract_id}', response_model=ThisModel, tags=_tag_base)
@shrink(repo.search_last)
def get(contract_id: UUID):
pass
@router.put('/{_id}', response_model=ThisModel, tags=_tag_base)
@shrink(repo.update)
def update(_id: UUID, coding: ThisModel = Body(...)):