mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 04:10:27 +08:00
26 lines
593 B
Go
26 lines
593 B
Go
package tasks
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
|
)
|
|
|
|
type DeleteBatchAction struct {
|
|
actionutils.ParentAction
|
|
}
|
|
|
|
func (this *DeleteBatchAction) RunPost(params struct {
|
|
TaskIds []int64
|
|
}) {
|
|
defer this.CreateLogInfo(codes.NodeTask_LogDeleteNodeTasksBatch)
|
|
|
|
_, err := this.RPC().NodeTaskRPC().DeleteNodeTasks(this.AdminContext(), &pb.DeleteNodeTasksRequest{NodeTaskIds: params.TaskIds})
|
|
if err != nil {
|
|
this.ErrorPage(err)
|
|
return
|
|
}
|
|
|
|
this.Success()
|
|
}
|