Fixed up the find object API
This commit is contained in:
@@ -73,8 +73,13 @@ class FilamentUpdateParameters(FilamentParameters):
|
|||||||
description="Get a list of filaments that matches the search query.",
|
description="Get a list of filaments that matches the search query.",
|
||||||
response_model_exclude_none=True,
|
response_model_exclude_none=True,
|
||||||
)
|
)
|
||||||
async def find(_vendor: Union[int, None] = None) -> list[Filament]:
|
async def find(
|
||||||
return []
|
vendor_id: Optional[int] = None,
|
||||||
|
name: Optional[str] = None,
|
||||||
|
material: Optional[str] = None,
|
||||||
|
article_number: Optional[str] = None,
|
||||||
|
) -> list[Filament]:
|
||||||
|
return [] # TODO: Implement
|
||||||
|
|
||||||
|
|
||||||
@router.get(
|
@router.get(
|
||||||
|
|||||||
@@ -63,8 +63,15 @@ class SpoolUseParameters(BaseModel):
|
|||||||
description="Get a list of spools that matches the search query.",
|
description="Get a list of spools that matches the search query.",
|
||||||
response_model_exclude_none=True,
|
response_model_exclude_none=True,
|
||||||
)
|
)
|
||||||
async def find(_filament: Union[int, None] = None) -> list[Spool]:
|
async def find(
|
||||||
return []
|
filament_id: Optional[int] = None,
|
||||||
|
name: Optional[str] = None,
|
||||||
|
material: Optional[str] = None,
|
||||||
|
vendor: Optional[str] = None,
|
||||||
|
location: Optional[str] = None,
|
||||||
|
lot_nr: Optional[str] = None,
|
||||||
|
) -> list[Spool]:
|
||||||
|
return [] # TODO: Implement
|
||||||
|
|
||||||
|
|
||||||
@router.get(
|
@router.get(
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ class VendorUpdateParameters(VendorParameters):
|
|||||||
description="Get a list of vendors that matches the search query.",
|
description="Get a list of vendors that matches the search query.",
|
||||||
response_model_exclude_none=True,
|
response_model_exclude_none=True,
|
||||||
)
|
)
|
||||||
async def find(_name: Union[int, None] = None) -> list[Vendor]:
|
async def find(name: Optional[str] = None) -> list[Vendor]:
|
||||||
return []
|
return [] # TODO: Implement
|
||||||
|
|
||||||
|
|
||||||
@router.get(
|
@router.get(
|
||||||
|
|||||||
Reference in New Issue
Block a user