From 162a0c543c8aa8b88bec563f3147ca269b635fc2 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:15:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Fix=20Issue=20with=20DNS=20Account=20De?= =?UTF-8?q?letion=20After=20Certificate=20Update=20Ap=E2=80=A6=20(#7303)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs https://github.com/1Panel-dev/1Panel/issues/7300 --- backend/app/service/website_ssl.go | 2 ++ backend/utils/geo/geo.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/app/service/website_ssl.go b/backend/app/service/website_ssl.go index 91eb47167..878f25724 100644 --- a/backend/app/service/website_ssl.go +++ b/backend/app/service/website_ssl.go @@ -512,6 +512,8 @@ func (w WebsiteSSLService) Update(update request.WebsiteSSLUpdate) error { return err } updateParams["dns_account_id"] = dnsAccount.ID + } else { + updateParams["dns_account_id"] = 0 } return websiteSSLRepo.SaveByMap(websiteSSL, updateParams) } diff --git a/backend/utils/geo/geo.go b/backend/utils/geo/geo.go index 977347cec..5e15937e0 100644 --- a/backend/utils/geo/geo.go +++ b/backend/utils/geo/geo.go @@ -33,7 +33,7 @@ func GetIPLocation(ip, lang string) (string, error) { return "", err } if lang == "en" { - return geoLocation.Country.En + geoLocation.Province.En, nil + return geoLocation.Country.En + " " + geoLocation.Province.En, nil } - return geoLocation.Country.Zh + geoLocation.Province.Zh, nil + return geoLocation.Country.Zh + " " + geoLocation.Province.Zh, nil }