From 854a74b73eb5b2e2c07cd73555d6630bacc1fe2f Mon Sep 17 00:00:00 2001 From: UsherFall <98513748+UsherFall@users.noreply.github.com> Date: Fri, 14 Jul 2023 15:58:30 +0800 Subject: [PATCH] feat: fix the error when user uploads avatar to minio (https) (#2078) * fix: Error reported when user uploads avatar to minio (https) * Update provider.go --------- Co-authored-by: hsluoyz --- object/provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/object/provider.go b/object/provider.go index 616eab7a..9a53cb3a 100644 --- a/object/provider.go +++ b/object/provider.go @@ -229,7 +229,7 @@ func UpdateProvider(id string, provider *Provider) (bool, error) { session = session.Omit("client_secret2") } - if provider.Type != "Keycloak" { + if provider.Type == "Tencent Cloud COS" { provider.Endpoint = util.GetEndPoint(provider.Endpoint) provider.IntranetEndpoint = util.GetEndPoint(provider.IntranetEndpoint) } @@ -243,7 +243,7 @@ func UpdateProvider(id string, provider *Provider) (bool, error) { } func AddProvider(provider *Provider) (bool, error) { - if provider.Type != "Keycloak" { + if provider.Type == "Tencent Cloud COS" { provider.Endpoint = util.GetEndPoint(provider.Endpoint) provider.IntranetEndpoint = util.GetEndPoint(provider.IntranetEndpoint) }