// Copyright 2024 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . package domains import ( "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" "github.com/TeaOSLab/EdgeCommon/pkg/langs/codes" "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" ) type DeletePageAction struct { actionutils.ParentAction } func (this *DeletePageAction) RunPost(params struct { DomainIds []int64 }) { defer this.CreateLogInfo(codes.NS_LogDeleteNSDomainsBatch, this.AdminContext()) if len(params.DomainIds) == 0 { this.Success() return } for _, domainId := range params.DomainIds { _, err := this.RPC().NSDomainRPC().DeleteNSDomain(this.AdminContext(), &pb.DeleteNSDomainRequest{ NsDomainId: domainId, }) if err != nil { this.ErrorPage(err) return } } this.Success() }