Files
waf-platform/EdgeUser/internal/web/actions/default/settings/identity/cancel.go

28 lines
712 B
Go

// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
package identity
import (
"github.com/TeaOSLab/EdgeCommon/pkg/langs/codes"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeUser/internal/web/actions/actionutils"
)
type CancelAction struct {
actionutils.ParentAction
}
func (this *CancelAction) RunPost(params struct {
IdentityId int64
}) {
defer this.CreateLogInfo(codes.UserIdentity_LogCancelUserIdentity)
_, err := this.RPC().UserIdentityRPC().CancelUserIdentity(this.UserContext(), &pb.CancelUserIdentityRequest{UserIdentityId: params.IdentityId})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}