return livekit server url from api

This commit is contained in:
talksik
2026-04-01 08:41:54 -07:00
parent 348fcad0cb
commit 0c340199e3
2 changed files with 8 additions and 2 deletions
+3 -2
View File
@@ -119,7 +119,8 @@ type GetLivekitTokenRequest struct {
}
type GetLivekitTokenResponse struct {
Token string `json:"token"`
Token string `json:"token"`
ServerUrl string `json:"server_url"`
}
// Depot DTOs
@@ -1083,7 +1084,7 @@ func (h *Handler) GetLivekitToken(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(GetLivekitTokenResponse{Token: token})
json.NewEncoder(w).Encode(GetLivekitTokenResponse{Token: token, ServerUrl: h.livekitClient.ServerUrl()})
}
func extractBearerToken(r *http.Request) string {