feat: 添加检查是否为管理员的接口

This commit is contained in:
2026-05-09 10:30:31 +08:00
parent 45db7f75ca
commit 50a89b6fc1
5 changed files with 40 additions and 2 deletions

View File

@@ -135,3 +135,9 @@ func (c *userController) IsSuperAdmin(ctx context.Context, req *system.IsSuperAd
IsSuperAdminRes.IsSuperAdmin, err = service.SysUser().IsSuperAdmin(ctx, req)
return
}
func (c *userController) IsAdmin(ctx context.Context, req *system.IsAdminReq) (IsSuperAdminRes *system.IsSuperAdminRes, err error) {
IsSuperAdminRes = new(system.IsSuperAdminRes)
IsSuperAdminRes.IsSuperAdmin, err = service.SysUser().IsAdmin(ctx, req)
return
}