[系统用户]实现系统用户的增删改

This commit is contained in:
GoEdgeLab
2020-12-02 23:11:43 +08:00
parent 99283d9b55
commit 02f6638963
25 changed files with 621 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
package admins
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 {
AdminId int64
}) {
defer this.CreateLogInfo("删除系统用户 %d", params.AdminId)
_, err := this.RPC().AdminRPC().DeleteAdmin(this.AdminContext(), &pb.DeleteAdminRequest{AdminId: params.AdminId})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}