@@ -9,7 +9,7 @@ import (
|
||||
|
||||
// GetConnectedClients returns currently connected clients.
|
||||
func GetConnectedClients(w http.ResponseWriter, r *http.Request) {
|
||||
clients := core.GetClients()
|
||||
clients := core.GetChatClients()
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
if err := json.NewEncoder(w).Encode(clients); err != nil {
|
||||
|
||||
13
controllers/ping.go
Normal file
13
controllers/ping.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncast/owncast/core"
|
||||
"github.com/owncast/owncast/utils"
|
||||
)
|
||||
|
||||
func Ping(w http.ResponseWriter, r *http.Request) {
|
||||
id := utils.GenerateClientIDFromRequest(r)
|
||||
core.SetViewerIdActive(id)
|
||||
}
|
||||
Reference in New Issue
Block a user