quotation service fixed
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
gatewaymongo "github.com/tech/sendico/gateway/tgsettle/storage/mongo"
|
||||
"github.com/tech/sendico/pkg/api/routers"
|
||||
"github.com/tech/sendico/pkg/db"
|
||||
"github.com/tech/sendico/pkg/discovery"
|
||||
"github.com/tech/sendico/pkg/merrors"
|
||||
msg "github.com/tech/sendico/pkg/messaging"
|
||||
mb "github.com/tech/sendico/pkg/messaging/broker"
|
||||
@@ -141,8 +142,12 @@ func (i *Imp) loadConfig() (*config, error) {
|
||||
if cfg.Metrics == nil {
|
||||
cfg.Metrics = &grpcapp.MetricsConfig{Address: ":9406"}
|
||||
}
|
||||
cfg.Gateway.Rail = discovery.NormalizeRail(cfg.Gateway.Rail)
|
||||
if cfg.Gateway.Rail == "" {
|
||||
return nil, merrors.InvalidArgument("gateway rail is required", "gateway.rail")
|
||||
}
|
||||
if !discovery.IsKnownRail(cfg.Gateway.Rail) {
|
||||
return nil, merrors.InvalidArgument("gateway rail must be a known token", "gateway.rail")
|
||||
}
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user