mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-16 00:09:14 +01:00
API response cleanup (#15389)
* API response cleanup * Remove extra field definition
This commit is contained in:
parent
bb86e71e65
commit
d0cc8cb64b
@ -1,6 +1,6 @@
|
|||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
|
||||||
class EventResponse(BaseModel):
|
class EventResponse(BaseModel):
|
||||||
@ -10,7 +10,7 @@ class EventResponse(BaseModel):
|
|||||||
camera: str
|
camera: str
|
||||||
start_time: float
|
start_time: float
|
||||||
end_time: Optional[float]
|
end_time: Optional[float]
|
||||||
false_positive: bool
|
false_positive: Optional[bool]
|
||||||
zones: list[str]
|
zones: list[str]
|
||||||
thumbnail: str
|
thumbnail: str
|
||||||
has_clip: bool
|
has_clip: bool
|
||||||
@ -22,6 +22,8 @@ class EventResponse(BaseModel):
|
|||||||
model_type: Optional[str]
|
model_type: Optional[str]
|
||||||
data: dict[str, Any]
|
data: dict[str, Any]
|
||||||
|
|
||||||
|
model_config = ConfigDict(protected_namespaces=())
|
||||||
|
|
||||||
|
|
||||||
class EventCreateResponse(BaseModel):
|
class EventCreateResponse(BaseModel):
|
||||||
success: bool
|
success: bool
|
||||||
|
Loading…
Reference in New Issue
Block a user