mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			650 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			650 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
 | 
						|
 | 
						|
package providers
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
						|
	"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
 | 
						|
)
 | 
						|
 | 
						|
type SyncDomainsAction struct {
 | 
						|
	actionutils.ParentAction
 | 
						|
}
 | 
						|
 | 
						|
func (this *SyncDomainsAction) RunPost(params struct {
 | 
						|
	ProviderId int64
 | 
						|
}) {
 | 
						|
	resp, err := this.RPC().DNSDomainRPC().SyncDNSDomainsFromProvider(this.AdminContext(), &pb.SyncDNSDomainsFromProviderRequest{DnsProviderId: params.ProviderId})
 | 
						|
	if err != nil {
 | 
						|
		this.Fail("更新域名失败:" + err.Error())
 | 
						|
	}
 | 
						|
 | 
						|
	this.Data["hasChanges"] = resp.HasChanges
 | 
						|
 | 
						|
	this.Success()
 | 
						|
}
 |