mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-04 02:40:25 +08:00
[用户]实现对平台用户的增删改查
This commit is contained in:
26
internal/web/actions/default/users/delete.go
Normal file
26
internal/web/actions/default/users/delete.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package users
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
|
||||
type DeleteAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *DeleteAction) RunPost(params struct {
|
||||
UserId int64
|
||||
}) {
|
||||
defer this.CreateLogInfo("删除用户 %d", params.UserId)
|
||||
|
||||
// TODO 检查用户是否有未完成的业务
|
||||
|
||||
_, err := this.RPC().UserRPC().DeleteUser(this.AdminContext(), &pb.DeleteUserRequest{UserId: params.UserId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
Reference in New Issue
Block a user