feat: 增加菜地搜索功能
This commit is contained in:
@@ -15,8 +15,8 @@ def create(data: PatchCreate, db: Session = Depends(get_db)):
|
||||
|
||||
|
||||
@router.get("", response_model=list[PatchResponse])
|
||||
def list_all(db: Session = Depends(get_db)):
|
||||
return patch_service.get_patches(db)
|
||||
def list_all(keyword: str | None, db: Session = Depends(get_db)):
|
||||
return patch_service.get_patches(db, keyword)
|
||||
|
||||
|
||||
@router.get("/{patch_id}", response_model=PatchResponse)
|
||||
|
||||
Reference in New Issue
Block a user