Project restructure (#18)
* First pass at restructuring the project; untested but it does compile * Restructure builds and runs 🎉 * Add the dist folder to the gitignore * Update core/playlist/monitor.go * golint and reorganize the monitor.go file Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
18
controllers/status.go
Normal file
18
controllers/status.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/gabek/owncast/core"
|
||||
"github.com/gabek/owncast/router/middleware"
|
||||
)
|
||||
|
||||
//GetStatus gets the status of the server
|
||||
func GetStatus(w http.ResponseWriter, r *http.Request) {
|
||||
middleware.EnableCors(&w)
|
||||
|
||||
status := core.GetStatus()
|
||||
|
||||
json.NewEncoder(w).Encode(status)
|
||||
}
|
||||
Reference in New Issue
Block a user