Viewer metrics api (#208)

* Add support for ending the inbound stream. Closes #191

* Add a simple success response to API requests

* Add viewers over time API

* Move controllers to admin directory
This commit is contained in:
Gabe Kangas
2020-10-02 00:06:14 -07:00
committed by GitHub
parent d8c43d2c56
commit 236f25b772
8 changed files with 66 additions and 12 deletions

View File

@@ -58,7 +58,10 @@ func Start() error {
http.HandleFunc("/api/admin/changekey", middleware.RequireAdminAuth(admin.ChangeStreamKey))
// Server config
http.HandleFunc("/api/admin/serverconfig", middleware.RequireAdminAuth(controllers.GetServerConfig))
http.HandleFunc("/api/admin/serverconfig", middleware.RequireAdminAuth(admin.GetServerConfig))
// Get viewer count over time
http.HandleFunc("/api/admin/viewersOverTime", middleware.RequireAdminAuth(admin.GetViewersOverTime))
port := config.Config.GetPublicWebServerPort()