mirror of
https://github.com/owncast/owncast.git
synced 2024-11-21 12:18:02 +03:00
0b5d7c8a4d
* WIP * fix(test): fix ap test failing * fix: fix unkeyed fields being used * chore(tests): clean up browser tests by splitting out federation UI tests
16 lines
422 B
Go
16 lines
422 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/owncast/owncast/persistence/configrepository"
|
|
)
|
|
|
|
// ServeCustomJavascript will serve optional custom Javascript.
|
|
func ServeCustomJavascript(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "text/javascript; charset=utf-8")
|
|
|
|
configRepository := configrepository.Get()
|
|
js := configRepository.GetCustomJavascript()
|
|
_, _ = w.Write([]byte(js))
|
|
}
|