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:
parent
a30666d999
commit
44615c5ff0
@ -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})
|
||||
|
Loading…
x
Reference in New Issue
Block a user