🚧(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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user