diff --git a/server/ldap-admin/internal/logic/getapislogic.go b/server/ldap-admin/internal/logic/getapislogic.go index 95857faa..01aea888 100644 --- a/server/ldap-admin/internal/logic/getapislogic.go +++ b/server/ldap-admin/internal/logic/getapislogic.go @@ -44,9 +44,7 @@ func (l *GetApisLogic) GetApis(req *types.GetApisReq, userinfo *auth.UserInfo) ( } var pageCount int = 1 if resCount > int64(req.PerPage) { - var float64Count = float64(resCount) - var float64PerPage = float64(req.PerPage) - pageCountFloat := math.Ceil(float64Count / float64PerPage) + pageCountFloat := math.Ceil(float64(resCount) / float64(req.PerPage)) pageCount = int(pageCountFloat) } diff --git a/server/ldap-admin/internal/logic/getldapgroupslogic.go b/server/ldap-admin/internal/logic/getldapgroupslogic.go index 14918fc1..d610cfb6 100644 --- a/server/ldap-admin/internal/logic/getldapgroupslogic.go +++ b/server/ldap-admin/internal/logic/getldapgroupslogic.go @@ -45,9 +45,7 @@ func (l *GetLdapGroupsLogic) GetLdapGroups(req *types.GetLdapGroupsReq, userinfo } var pageCount int = 1 if resCount > int64(req.PerPage) { - var float64Count = float64(resCount) - var float64PerPage = float64(req.PerPage) - pageCountFloat := math.Ceil(float64Count / float64PerPage) + pageCountFloat := math.Ceil(float64(resCount) / float64(req.PerPage)) pageCount = int(pageCountFloat) }