🚧(backend) serialize the LiveKit access token

Call utility function while getting room informations, to return
a proper access token to the user which connects to a room.
This commit is contained in:
lebaudantoine
2024-06-25 19:07:34 +02:00
parent 2deef12d05
commit 817d352f00
3 changed files with 35 additions and 25 deletions

View File

@@ -17,7 +17,7 @@ from rest_framework import (
response as drf_response,
)
from core import models
from core import models, utils
from . import permissions, serializers
@@ -192,8 +192,7 @@ class RoomViewSet(
"id": None,
"livekit": {
"room": slug,
# todo - generate a proper token
"token": "foo",
"token": utils.generate_token(room=slug, user=request.user),
},
}
else: