From cf62669472c536b7fb058d3ba860595a6f132282 Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Mon, 2 Nov 2020 09:32:10 +0100 Subject: [PATCH] Remove unused parameters --- .../http/services/dataprovider/dataprovider.go | 17 +++++------------ internal/http/services/owncloud/ocdav/put.go | 6 ++++-- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/internal/http/services/dataprovider/dataprovider.go b/internal/http/services/dataprovider/dataprovider.go index 889816ad65..fea3b918df 100644 --- a/internal/http/services/dataprovider/dataprovider.go +++ b/internal/http/services/dataprovider/dataprovider.go @@ -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 { diff --git a/internal/http/services/owncloud/ocdav/put.go b/internal/http/services/owncloud/ocdav/put.go index eec782664c..61c4875b28 100644 --- a/internal/http/services/owncloud/ocdav/put.go +++ b/internal/http/services/owncloud/ocdav/put.go @@ -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