chore(api): reorganize handlers into webserver package

This commit is contained in:
Gabe Kangas
2024-07-01 21:44:51 -07:00
parent e200692502
commit 93c0a20935
54 changed files with 904 additions and 933 deletions
+15
View File
@@ -0,0 +1,15 @@
package handlers
import (
"net/http"
"github.com/owncast/owncast/core"
"github.com/owncast/owncast/models"
)
// Ping is fired by a client to show they are still an active viewer.
func Ping(w http.ResponseWriter, r *http.Request) {
viewer := models.GenerateViewerFromRequest(r)
core.SetViewerActive(&viewer)
w.WriteHeader(http.StatusOK)
}