Clarify in routes and names that it is chat clients being returned
This commit is contained in:
parent
5f322c84f6
commit
2cf761a3f1
@ -9,8 +9,8 @@ import (
|
|||||||
"github.com/owncast/owncast/core/user"
|
"github.com/owncast/owncast/core/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetConnectedClients returns currently connected clients.
|
// GetConnectedChatClients returns currently connected clients.
|
||||||
func GetConnectedClients(w http.ResponseWriter, r *http.Request) {
|
func GetConnectedChatClients(w http.ResponseWriter, r *http.Request) {
|
||||||
clients := chat.GetClients()
|
clients := chat.GetClients()
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ func GetConnectedClients(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExternalGetConnectedClients returns currently connected clients.
|
// ExternalGetConnectedChatClients returns currently connected clients.
|
||||||
func ExternalGetConnectedClients(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request) {
|
func ExternalGetConnectedChatClients(integration user.ExternalAPIUser, w http.ResponseWriter, r *http.Request) {
|
||||||
GetConnectedClients(w, r)
|
GetConnectedChatClients(w, r)
|
||||||
}
|
}
|
||||||
|
@ -664,7 +664,7 @@ paths:
|
|||||||
'200':
|
'200':
|
||||||
$ref: "#/components/responses/BasicResponse"
|
$ref: "#/components/responses/BasicResponse"
|
||||||
|
|
||||||
/api/admin/clients:
|
/api/admin/chat/clients:
|
||||||
get:
|
get:
|
||||||
summary: Return a list of currently connected clients
|
summary: Return a list of currently connected clients
|
||||||
description: Return a list of currently connected clients with optional geo details.
|
description: Return a list of currently connected clients with optional geo details.
|
||||||
|
@ -77,8 +77,8 @@ func Start() error {
|
|||||||
// Get hardware stats
|
// Get hardware stats
|
||||||
http.HandleFunc("/api/admin/hardwarestats", middleware.RequireAdminAuth(admin.GetHardwareStats))
|
http.HandleFunc("/api/admin/hardwarestats", middleware.RequireAdminAuth(admin.GetHardwareStats))
|
||||||
|
|
||||||
// Get a a detailed list of currently connected clients
|
// Get a a detailed list of currently connected chat clients
|
||||||
http.HandleFunc("/api/admin/clients", middleware.RequireAdminAuth(admin.GetConnectedClients))
|
http.HandleFunc("/api/admin/chat/clients", middleware.RequireAdminAuth(admin.GetConnectedChatClients))
|
||||||
|
|
||||||
// Get all logs
|
// Get all logs
|
||||||
http.HandleFunc("/api/admin/logs", middleware.RequireAdminAuth(admin.GetLogs))
|
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))
|
http.HandleFunc("/api/integrations/chat", middleware.RequireExternalAPIAccessToken(user.ScopeHasAdminAccess, controllers.ExternalGetChatMessages))
|
||||||
|
|
||||||
// Connected clients
|
// 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
|
// Logo path
|
||||||
http.HandleFunc("/api/admin/config/logo", middleware.RequireAdminAuth(admin.SetLogo))
|
http.HandleFunc("/api/admin/config/logo", middleware.RequireAdminAuth(admin.SetLogo))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user