feat:add program audit
This commit is contained in:
@@ -2,7 +2,7 @@ from uuid import UUID
|
||||
|
||||
from fastapi import Body
|
||||
|
||||
from app.models.program_audit import ProgramModel
|
||||
from app.models.program_audit import ProgramModel, CheckLast
|
||||
from app.repositories.program_audit import ProgramRepository
|
||||
from core.app import app
|
||||
from core.utils.router import generate_router, shrink
|
||||
@@ -19,6 +19,11 @@ repo = ProgramRepository()
|
||||
def create(coding: ThisModel = Body(...)):
|
||||
pass
|
||||
|
||||
@router.post('/last', response_model=ThisModel, tags=_tag_base)
|
||||
@shrink(repo.is_last)
|
||||
def is_last(coding: CheckLast = Body(...)):
|
||||
pass
|
||||
|
||||
@router.put('/{_id}', response_model=ThisModel, tags=_tag_base)
|
||||
@shrink(repo.update)
|
||||
def update(_id: UUID, coding: ThisModel = Body(...)):
|
||||
|
||||
Reference in New Issue
Block a user