(backend) add recording mode to serialized fields

Include recording mode in serialized data to enable conditional UI elements
in frontend. Allows download controls to be dynamically enabled or disabled
based on the specific recording type being used.

Screen recording will be downloadable when transcript won't.
This commit is contained in:
lebaudantoine
2025-04-11 13:04:14 +02:00
committed by aleb_the_flash
parent b7d964db56
commit 3a4f4e7016
2 changed files with 2 additions and 1 deletions

View File

@@ -156,7 +156,7 @@ class RecordingSerializer(serializers.ModelSerializer):
class Meta:
model = models.Recording
fields = ["id", "room", "created_at", "updated_at", "status"]
fields = ["id", "room", "created_at", "updated_at", "status", "mode"]
read_only_fields = fields

View File

@@ -58,6 +58,7 @@ def test_api_recordings_list_authenticated_direct(role):
assert results[0] == {
"id": str(recording.id),
"created_at": recording.created_at.isoformat().replace("+00:00", "Z"),
"mode": recording.mode,
"room": {
"access_level": str(room.access_level),
"id": str(room.id),