mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-12 17:10:26 -07:00
* docs: add example for usage of the main listenbrainz instance (#71) * docs: add example for usage of the main listenbrainz instance * Update scrobbler.md --------- Co-authored-by: Gabe Farrell <90876006+gabehf@users.noreply.github.com> * feat: add server-side cfg and default theme * fix: repair custom theme --------- Co-authored-by: m0d3rnX <jesper@posteo.de>
18 lines
383 B
Go
18 lines
383 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gabehf/koito/internal/cfg"
|
|
"github.com/gabehf/koito/internal/utils"
|
|
)
|
|
|
|
type ServerConfig struct {
|
|
DefaultTheme string `json:"default_theme"`
|
|
}
|
|
|
|
func GetCfgHandler() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
utils.WriteJSON(w, http.StatusOK, ServerConfig{DefaultTheme: cfg.DefaultTheme()})
|
|
}
|
|
}
|