mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-18 17:35:19 +08:00
域名解析中可以删除和恢复某个域名
This commit is contained in:
27
internal/web/actions/default/dns/domains/recover.go
Normal file
27
internal/web/actions/default/dns/domains/recover.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package domains
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/oplogs"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
|
||||
type RecoverAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *RecoverAction) RunPost(params struct {
|
||||
DomainId int64
|
||||
}) {
|
||||
// 记录日志
|
||||
defer this.CreateLog(oplogs.LevelInfo, "从DNS服务商中恢复域名 %d", params.DomainId)
|
||||
|
||||
// 执行恢复
|
||||
_, err := this.RPC().DNSDomainRPC().RecoverDNSDomain(this.AdminContext(), &pb.RecoverDNSDomainRequest{DnsDomainId: params.DomainId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
@@ -52,7 +52,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
// TODO 检查DomainId
|
||||
|
||||
// 记录日志
|
||||
defer this.CreateLog(oplogs.LevelInfo, "修改管理域名到DNS服务商 %d", params.DomainId)
|
||||
defer this.CreateLog(oplogs.LevelInfo, "修改DNS服务商域名 %d", params.DomainId)
|
||||
|
||||
params.Must.
|
||||
Field("name", params.Name).
|
||||
|
||||
Reference in New Issue
Block a user