Consolidate config files and surface frontend values via API. Closes #30
This commit is contained in:
18
controllers/config.go
Normal file
18
controllers/config.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/gabek/owncast/config"
|
||||
"github.com/gabek/owncast/router/middleware"
|
||||
)
|
||||
|
||||
//GetWebConfig gets the status of the server
|
||||
func GetWebConfig(w http.ResponseWriter, r *http.Request) {
|
||||
middleware.EnableCors(&w)
|
||||
|
||||
config := config.Config.InstanceDetails
|
||||
|
||||
json.NewEncoder(w).Encode(config)
|
||||
}
|
||||
Reference in New Issue
Block a user