1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-24 13:48:49 +08:00

Remove empty channels check (#720)

Remove empty list of channels check from the default Bootstrap
reader implementation.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
This commit is contained in:
Dušan Borovčanin 2019-04-18 18:02:20 +02:00 committed by Aleksandar Novaković
parent a30666d999
commit 44615c5ff0

View File

@ -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})