Skip to content

Commit

Permalink
apply defaults on public storage provider
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Sep 26, 2023
1 parent 116b3c6 commit 82d632c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/cs3org/reva/pkg/rgrpc"
"github.com/cs3org/reva/pkg/rgrpc/status"
"github.com/cs3org/reva/pkg/rgrpc/todo/pool"
"github.com/cs3org/reva/pkg/sharedconf"
rtrace "github.com/cs3org/reva/pkg/trace"
"github.com/cs3org/reva/pkg/utils"
"github.com/cs3org/reva/pkg/utils/cfg"
Expand All @@ -51,7 +52,15 @@ func init() {
type config struct {
MountPath string `mapstructure:"mount_path"`
MountID string `mapstructure:"mount_id"`
GatewayAddr string `mapstructure:"gateway_addr"`
GatewayAddr string `mapstructure:"gatewaysvc"`
}

func (c *config) ApplyDefaults() {
c.GatewayAddr = sharedconf.GetGatewaySVC(c.GatewayAddr)

if c.MountPath == "" {
c.MountPath = "/public"
}
}

type service struct {
Expand Down

0 comments on commit 82d632c

Please sign in to comment.