28 lines
712 B
Go
28 lines
712 B
Go
// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
|
|
|
package antiddos
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
|
)
|
|
|
|
type DeleteAction struct {
|
|
actionutils.ParentAction
|
|
}
|
|
|
|
func (this *DeleteAction) RunPost(params struct {
|
|
PackageId int64
|
|
}) {
|
|
defer this.CreateLogInfo(codes.ADPackage_LogDeleteADPackage, params.PackageId)
|
|
|
|
_, err := this.RPC().ADPackageRPC().DeleteADPackage(this.AdminContext(), &pb.DeleteADPackageRequest{AdPackageId: params.PackageId})
|
|
if err != nil {
|
|
this.ErrorPage(err)
|
|
return
|
|
}
|
|
|
|
this.Success()
|
|
}
|