|
|
|
@ -14,6 +14,8 @@ type SiteConfig struct {
|
|
|
|
|
DefaultTheme string `json:"defaultTheme"`
|
|
|
|
|
ScoreEnabled bool `json:"score_enabled"`
|
|
|
|
|
ShareScoreRate string `json:"share_score_rate"`
|
|
|
|
|
HomepageViewMethod string `json:"home_view_method"`
|
|
|
|
|
ShareViewMethod string `json:"share_view_method"`
|
|
|
|
|
User User `json:"user"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -42,6 +44,8 @@ func BuildSiteConfig(settings map[string]string, user *model.User) Response {
|
|
|
|
|
DefaultTheme: checkSettingValue(settings, "defaultTheme"),
|
|
|
|
|
ScoreEnabled: model.IsTrueVal(checkSettingValue(settings, "score_enabled")),
|
|
|
|
|
ShareScoreRate: checkSettingValue(settings, "share_score_rate"),
|
|
|
|
|
HomepageViewMethod: checkSettingValue(settings, "home_view_method"),
|
|
|
|
|
ShareViewMethod: checkSettingValue(settings, "share_view_method"),
|
|
|
|
|
User: userRes,
|
|
|
|
|
}}
|
|
|
|
|
}
|
|
|
|
|