API response cleanup (#15389)

* API response cleanup

* Remove extra field definition
This commit is contained in:
Nicolas Mowen 2024-12-06 20:07:43 -06:00 committed by GitHub
parent bb86e71e65
commit d0cc8cb64b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
from typing import Any, Optional
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
class EventResponse(BaseModel):
@ -10,7 +10,7 @@ class EventResponse(BaseModel):
camera: str
start_time: float
end_time: Optional[float]
false_positive: bool
false_positive: Optional[bool]
zones: list[str]
thumbnail: str
has_clip: bool
@ -22,6 +22,8 @@ class EventResponse(BaseModel):
model_type: Optional[str]
data: dict[str, Any]
model_config = ConfigDict(protected_namespaces=())
class EventCreateResponse(BaseModel):
success: bool