You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
746 B
Go
34 lines
746 B
Go
1 year ago
|
package role_admin
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"git.noahlan.cn/n-admin/n-admin-server/rpc/core/types/core"
|
||
|
|
||
|
"git.noahlan.cn/n-admin/n-admin-server/api/internal/svc"
|
||
|
"git.noahlan.cn/n-admin/n-admin-server/api/internal/types"
|
||
|
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
type DeleteRoleAdminLogic struct {
|
||
|
ctx context.Context
|
||
|
svcCtx *svc.ServiceContext
|
||
|
r *http.Request
|
||
|
}
|
||
|
|
||
|
func NewDeleteRoleAdminLogic(r *http.Request, ctx context.Context, svcCtx *svc.ServiceContext) *DeleteRoleAdminLogic {
|
||
|
return &DeleteRoleAdminLogic{
|
||
|
r: r,
|
||
|
ctx: ctx,
|
||
|
svcCtx: svcCtx,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (l *DeleteRoleAdminLogic) DeleteRoleAdmin(req *types.BaseIDs) error {
|
||
|
_, err := l.svcCtx.CoreRpc.DeleteRole(l.ctx, &core.IDsReq{Ids: req.Ids})
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
return nil
|
||
|
}
|