Skip to content

Commit

Permalink
Remove unused parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Nov 2, 2020
1 parent 4ba631a commit cf62669
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
17 changes: 5 additions & 12 deletions internal/http/services/dataprovider/dataprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,20 @@ func init() {
}

type config struct {
Prefix string `mapstructure:"prefix" docs:"data;The prefix to be used for this HTTP service"`
Driver string `mapstructure:"driver" docs:"localhome;The storage driver to be used."`
Drivers map[string]map[string]interface{} `mapstructure:"drivers" docs:"url:pkg/storage/fs/localhome/localhome.go;The configuration for the storage driver"`
Timeout int64 `mapstructure:"timeout"`
Insecure bool `mapstructure:"insecure"`
TempDirectory string `mapstructure:"temp_directory"`
Prefix string `mapstructure:"prefix" docs:"data;The prefix to be used for this HTTP service"`
Driver string `mapstructure:"driver" docs:"localhome;The storage driver to be used."`
Drivers map[string]map[string]interface{} `mapstructure:"drivers" docs:"url:pkg/storage/fs/localhome/localhome.go;The configuration for the storage driver"`
Timeout int64 `mapstructure:"timeout"`
Insecure bool `mapstructure:"insecure"`
}

func (c *config) init() {
if c.Prefix == "" {
c.Prefix = "data"
}

if c.Driver == "" {
c.Driver = "localhome"
}

if c.TempDirectory == "" {
c.TempDirectory = "/var/tmp/reva/tmp"
}

}

type svc struct {
Expand Down
6 changes: 4 additions & 2 deletions internal/http/services/owncloud/ocdav/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ func (s *svc) handlePutHelper(w http.ResponseWriter, r *http.Request, content io
sReq = &provider.StatRequest{
Ref: &provider.Reference{
Spec: &provider.Reference_Path{
Path: chunk.Path},
}}
Path: chunk.Path,
},
},
}
}

// stat again to check the new file's metadata
Expand Down

0 comments on commit cf62669

Please sign in to comment.