From 3d3dc7b023818df6bf3da2c0fe86c3134582901b Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte Date: Wed, 22 Feb 2023 10:38:05 +0100 Subject: [PATCH 1/2] cleanup unused configs in ocm service --- internal/http/services/ocmd/invites.go | 9 +-------- internal/http/services/ocmd/ocm.go | 12 ++++-------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/internal/http/services/ocmd/invites.go b/internal/http/services/ocmd/invites.go index bae981ed2f..2240a4e2ea 100644 --- a/internal/http/services/ocmd/invites.go +++ b/internal/http/services/ocmd/invites.go @@ -33,14 +33,11 @@ import ( "github.com/cs3org/reva/internal/http/services/reqres" "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/rgrpc/todo/pool" - "github.com/cs3org/reva/pkg/smtpclient" "github.com/cs3org/reva/pkg/utils" ) type invitesHandler struct { - smtpCredentials *smtpclient.SMTPCredentials - gatewayClient gateway.GatewayAPIClient - meshDirectoryURL string + gatewayClient gateway.GatewayAPIClient } func (h *invitesHandler) init(c *config) error { @@ -49,10 +46,6 @@ func (h *invitesHandler) init(c *config) error { if err != nil { return err } - if c.SMTPCredentials != nil { - h.smtpCredentials = smtpclient.NewSMTPCredentials(c.SMTPCredentials) - } - h.meshDirectoryURL = c.MeshDirectoryURL return nil } diff --git a/internal/http/services/ocmd/ocm.go b/internal/http/services/ocmd/ocm.go index 68e3040b0d..f998db52da 100644 --- a/internal/http/services/ocmd/ocm.go +++ b/internal/http/services/ocmd/ocm.go @@ -24,7 +24,6 @@ import ( "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/rhttp/global" "github.com/cs3org/reva/pkg/sharedconf" - "github.com/cs3org/reva/pkg/smtpclient" "github.com/go-chi/chi/v5" "github.com/mitchellh/mapstructure" "github.com/rs/zerolog" @@ -35,13 +34,10 @@ func init() { } type config struct { - SMTPCredentials *smtpclient.SMTPCredentials `mapstructure:"smtp_credentials"` - Prefix string `mapstructure:"prefix"` - Host string `mapstructure:"host"` - GatewaySvc string `mapstructure:"gatewaysvc"` - MeshDirectoryURL string `mapstructure:"mesh_directory_url"` - Config configData `mapstructure:"config"` - ExposeRecipientDisplayName bool `mapstructure:"expose_recipient_display_name"` + Prefix string `mapstructure:"prefix"` + GatewaySvc string `mapstructure:"gatewaysvc"` + Config configData `mapstructure:"config"` + ExposeRecipientDisplayName bool `mapstructure:"expose_recipient_display_name"` } func (c *config) init() { From 2e190ec949b915572e2c2ef933849968a52459b2 Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte Date: Wed, 22 Feb 2023 11:13:53 +0100 Subject: [PATCH 2/2] add changelog --- changelog/unreleased/ocm-config-cleanup.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/unreleased/ocm-config-cleanup.md diff --git a/changelog/unreleased/ocm-config-cleanup.md b/changelog/unreleased/ocm-config-cleanup.md new file mode 100644 index 0000000000..19bd42f83e --- /dev/null +++ b/changelog/unreleased/ocm-config-cleanup.md @@ -0,0 +1,3 @@ +Enhancement: Cleanup unused configs in OCM HTTP service + +https://github.com/cs3org/reva/pull/3675 \ No newline at end of file