feat: backend support for branding changing
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
parent
94615ddeae
commit
51d135c808
@ -12,6 +12,7 @@ type settingsData struct {
|
||||
Signup bool `json:"signup"`
|
||||
Defaults types.UserDefaults `json:"defaults"`
|
||||
Rules []types.Rule `json:"rules"`
|
||||
Branding types.Branding `json:"branding"`
|
||||
Commands map[string][]string `json:"commands"`
|
||||
}
|
||||
|
||||
@ -25,6 +26,7 @@ func (e *Env) settingsGetHandler(w http.ResponseWriter, r *http.Request) {
|
||||
Signup: e.Settings.Signup,
|
||||
Defaults: e.Settings.Defaults,
|
||||
Rules: e.Settings.Rules,
|
||||
Branding: e.Settings.Branding,
|
||||
Commands: e.Runner.Commands,
|
||||
}
|
||||
|
||||
@ -64,6 +66,7 @@ func (e *Env) settingsPutHandler(w http.ResponseWriter, r *http.Request) {
|
||||
settings.Signup = req.Signup
|
||||
settings.Defaults = req.Defaults
|
||||
settings.Rules = req.Rules
|
||||
settings.Branding = req.Branding
|
||||
|
||||
err = e.Store.Config.SaveSettings(settings)
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user