diff --git a/controllers/admin/connectedClients.go b/controllers/admin/connectedClients.go index 410f9e1a4..01c2f99fe 100644 --- a/controllers/admin/connectedClients.go +++ b/controllers/admin/connectedClients.go @@ -9,8 +9,8 @@ import ( "github.com/owncast/owncast/core/user" ) -// GetConnectedClients returns currently connected clients. -func GetConnectedClients(w http.ResponseWriter, r *http.Request) { +// GetConnectedChatClients returns currently connected clients. +func GetConnectedChatClients(w http.ResponseWriter, r *http.Request) { clients := chat.GetClients() w.Header().Set("Content-Type", "application/json") @@ -19,7 +19,7 @@ func GetConnectedClients(w http.ResponseWriter, r *http.Request) { } } -// ExternalGetConnectedClients returns currently connected clients. -func ExternalGetConnectedClients(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request) { - GetConnectedClients(w, r) +// ExternalGetConnectedChatClients returns currently connected clients. +func ExternalGetConnectedChatClients(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request) { + GetConnectedChatClients(w, r) } diff --git a/openapi.yaml b/openapi.yaml index f6806f330..fe74da76f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -664,7 +664,7 @@ paths: '200': $ref: "#/components/responses/BasicResponse" - /api/admin/clients: + /api/admin/chat/clients: get: summary: Return a list of currently connected clients description: Return a list of currently connected clients with optional geo details. diff --git a/router/router.go b/router/router.go index 58f543ab2..a3c30ce9c 100644 --- a/router/router.go +++ b/router/router.go @@ -77,8 +77,8 @@ func Start() error { // Get hardware stats http.HandleFunc("/api/admin/hardwarestats", middleware.RequireAdminAuth(admin.GetHardwareStats)) - // Get a a detailed list of currently connected clients - http.HandleFunc("/api/admin/clients", middleware.RequireAdminAuth(admin.GetConnectedClients)) + // Get a a detailed list of currently connected chat clients + http.HandleFunc("/api/admin/chat/clients", middleware.RequireAdminAuth(admin.GetConnectedChatClients)) // Get all logs http.HandleFunc("/api/admin/logs", middleware.RequireAdminAuth(admin.GetLogs)) @@ -167,7 +167,7 @@ func Start() error { http.HandleFunc("/api/integrations/chat", middleware.RequireExternalAPIAccessToken(user.ScopeHasAdminAccess, controllers.ExternalGetChatMessages)) // Connected clients - http.HandleFunc("/api/integrations/clients", middleware.RequireExternalAPIAccessToken(user.ScopeHasAdminAccess, admin.ExternalGetConnectedClients)) + http.HandleFunc("/api/integrations/clients", middleware.RequireExternalAPIAccessToken(user.ScopeHasAdminAccess, admin.ExternalGetConnectedChatClients)) // Logo path http.HandleFunc("/api/admin/config/logo", middleware.RequireAdminAuth(admin.SetLogo))