Added KOITO_DATE_FORMAT option to choose how the dates are displayed

This commit is contained in:
joffrey-b 2026-04-21 11:17:47 +02:00
parent 0ec7b458cc
commit 61d5f2f5f0
10 changed files with 53 additions and 9 deletions

View file

@ -9,10 +9,15 @@ import (
type ServerConfig struct {
DefaultTheme string `json:"default_theme"`
DateFormat string `json:"date_format"`
}
func GetCfgHandler() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
utils.WriteJSON(w, http.StatusOK, ServerConfig{DefaultTheme: cfg.DefaultTheme()})
utils.WriteJSON(w, http.StatusOK, ServerConfig{
DefaultTheme: cfg.DefaultTheme(),
DateFormat: cfg.DateFormat(),
})
}
}