func (h *Handler) GetSettings(tkn string) (map[string]SettingUI, error) {
	logger := h.logger.Add("method", "GetSettings")

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

	result := make(map[string]SettingUI)

	settings, err := h.selectAllFrom(
		logger, data.SettingTable, settingsCondition)
	if err != nil {
		return nil, err
	}

	for _, v := range settings {
		setting := *v.(*data.Setting)
		result[setting.Key] = SettingUI{setting.Value,
			PermissionsToString[setting.Permissions]}
	}

	return result, err
}
func (h *Handler) GetSettings(tkn string) (map[string]SettingUI, error) {
	logger := h.logger.Add("method", "GetSettings")

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

	result := make(map[string]SettingUI)

	settings, err := h.selectAllFrom(
		logger, data.SettingTable, settingsCondition)
	if err != nil {
		return nil, err
	}

	for _, v := range settings {
		setting := *v.(*data.Setting)
		result[setting.Key] = SettingUI{setting.Value,
			PermissionsToString[setting.Permissions]}
	}

	return result, err
}
func ( h * Handler ) GetSettings ( tkn string ) ( map [ string ] SettingUI , error ) { logger := h . logger . Add ( " " , " " ) if ! h . token . Check ( tkn ) { logger . Warn ( " " ) return nil , ErrAccessDenied } result := make ( map [ string ] SettingUI ) settings , err := h . selectAllFrom ( logger , data . SettingTable , settingsCondition ) if err != nil { return nil , err } for _ , v := range settings { setting := * v . ( * data . Setting ) result [ setting . Key ] = SettingUI { setting . Value , PermissionsToString [ setting . Permissions ] } } return result , err }
// GetSettings returns settings.
GetSettings returns settings .