func (h *Handler) SetGUISettings(tkn string, v map[string]interface{}) error {
	logger := h.logger.Add("method", "SetGUISettings")

	if !h.token.Check(tkn) {
		logger.Warn("access denied")
		return ErrAccessDenied
	}

	d, err := json.Marshal(&v)
	if err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	_, err = h.db.Exec(`
		UPDATE settings 
		   SET value = $1
		 WHERE key=$2`, string(d), data.SettingGUI)
	if err != nil {
		logger.Error(fmt.Sprintf("failed to set gui settings: %v", err))
		return ErrInternal
	}

	return nil
}
func (h *Handler) SetGUISettings(tkn string, v map[string]interface{}) error {
	logger := h.logger.Add("method", "SetGUISettings")

	if !h.token.Check(tkn) {
		logger.Warn("access denied")
		return ErrAccessDenied
	}

	d, err := json.Marshal(&v)
	if err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	_, err = h.db.Exec(`
		UPDATE settings 
		   SET value = $1
		 WHERE key=$2`, string(d), data.SettingGUI)
	if err != nil {
		logger.Error(fmt.Sprintf("failed to set gui settings: %v", err))
		return ErrInternal
	}

	return nil
}
func ( h * Handler ) SetGUISettings ( tkn string , v map [ string ] interface { } ) error { logger := h . logger . Add ( " " , " " ) if ! h . token . Check ( tkn ) { logger . Warn ( " " ) return ErrAccessDenied } d , err := json . Marshal ( & v ) if err != nil { logger . Error ( err . Error ( ) ) return ErrInternal } _ , err = h . db . Exec ( `
		UPDATE settings 
		   SET value = $1
		 WHERE key=$2` , string ( d ) , data . SettingGUI ) if err != nil { logger . Error ( fmt . Sprintf ( " " , err ) ) return ErrInternal } return nil }
// SetGUISettings sets gui settings.
SetGUISettings sets gui settings .