From 44615c5ff0bdb885f61128ba244e71c5c6acbe08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Borov=C4=8Danin?= Date: Thu, 18 Apr 2019 18:02:20 +0200 Subject: [PATCH] Remove empty channels check (#720) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove empty list of channels check from the default Bootstrap reader implementation. Signed-off-by: Dušan Borovčanin --- bootstrap/reader.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bootstrap/reader.go b/bootstrap/reader.go index 03c4bfe9..1b144d99 100644 --- a/bootstrap/reader.go +++ b/bootstrap/reader.go @@ -8,7 +8,6 @@ package bootstrap import ( - "errors" "net/http" "github.com/mainflux/mainflux" @@ -51,10 +50,6 @@ func NewConfigReader() ConfigReader { } func (r reader) ReadConfig(cfg Config) (mainflux.Response, error) { - if len(cfg.MFChannels) < 1 { - return bootstrapRes{}, errors.New("Invalid configuration") - } - var channels []channelRes for _, ch := range cfg.MFChannels { channels = append(channels, channelRes{ID: ch.ID, Name: ch.Name, Metadata: ch.Metadata})