Files
waf-platform/EdgeAdmin/internal/web/actions/default/plans/userPlans/delete.go
2026-02-04 20:27:13 +08:00

29 lines
691 B
Go

// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
//go:build plus
package userPlans
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 {
UserPlanId int64
}) {
defer this.CreateLogInfo(codes.UserPlan_LogDeleteUserPlan, params.UserPlanId)
_, err := this.RPC().UserPlanRPC().DeleteUserPlan(this.AdminContext(), &pb.DeleteUserPlanRequest{UserPlanId: params.UserPlanId})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}