diff --git a/modules/structs/settings.go b/modules/structs/settings.go index 6874d6705b..0cb7b32841 100644 --- a/modules/structs/settings.go +++ b/modules/structs/settings.go @@ -12,6 +12,7 @@ type GeneralRepoSettings struct { // GeneralUISettings contains global ui settings exposed by API type GeneralUISettings struct { + DefaultTheme string `json:"default_theme"` AllowedReactions []string `json:"allowed_reactions"` } diff --git a/routers/api/v1/settings/settings.go b/routers/api/v1/settings/settings.go index 2b7b11bfd8..c94a3141e2 100644 --- a/routers/api/v1/settings/settings.go +++ b/routers/api/v1/settings/settings.go @@ -23,6 +23,7 @@ func GetGeneralUISettings(ctx *context.APIContext) { // "200": // "$ref": "#/responses/GeneralUISettings" ctx.JSON(http.StatusOK, api.GeneralUISettings{ + DefaultTheme: setting.UI.DefaultTheme, AllowedReactions: setting.UI.Reactions, }) } diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index c8e669387b..9536545041 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -7,6 +7,7 @@