add a monitoring camera setting for cetana
This commit is contained in:
@@ -4,7 +4,15 @@ from apps.live_monitoring.models import Camera
|
||||
|
||||
|
||||
class CameraSerializer(serializers.ModelSerializer):
|
||||
# auth_config is never exposed to the frontend.
|
||||
"""Public camera card. Stream URLs and credentials are never listed here —
|
||||
clients must go through the tokenized ``access`` / ``verify`` flow.
|
||||
"""
|
||||
|
||||
protocol = serializers.SerializerMethodField()
|
||||
|
||||
class Meta:
|
||||
model = Camera
|
||||
fields = ["id", "name", "facility", "processing_line", "stream_url", "active"]
|
||||
fields = ["id", "name", "facility", "processing_line", "protocol", "active"]
|
||||
|
||||
def get_protocol(self, obj: Camera) -> str:
|
||||
return obj.resolved_protocol()
|
||||
|
||||
Reference in New Issue
Block a user