优化代码

This commit is contained in:
GoEdgeLab
2022-08-11 15:25:58 +08:00
parent 81cac41992
commit 816bffd0fd
24 changed files with 31 additions and 318 deletions

View File

@@ -23,7 +23,7 @@ func (this *SelectCountriesPopupAction) RunGet(params struct {
}) {
var selectedCountryIds = utils.SplitNumbers(params.CountryIds)
countriesResp, err := this.RPC().RegionCountryRPC().FindAllEnabledRegionCountries(this.AdminContext(), &pb.FindAllEnabledRegionCountriesRequest{})
countriesResp, err := this.RPC().RegionCountryRPC().FindAllRegionCountries(this.AdminContext(), &pb.FindAllRegionCountriesRequest{})
if err != nil {
this.ErrorPage(err)
return
@@ -50,7 +50,7 @@ func (this *SelectCountriesPopupAction) RunPost(params struct {
}) {
var countryMaps = []maps.Map{}
for _, countryId := range params.CountryIds {
countryResp, err := this.RPC().RegionCountryRPC().FindEnabledRegionCountry(this.AdminContext(), &pb.FindEnabledRegionCountryRequest{RegionCountryId: countryId})
countryResp, err := this.RPC().RegionCountryRPC().FindRegionCountry(this.AdminContext(), &pb.FindRegionCountryRequest{RegionCountryId: countryId})
if err != nil {
this.ErrorPage(err)
return