0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(core): fix roles count (#2963)

This commit is contained in:
wangsijie 2023-01-17 11:56:26 +08:00 committed by GitHub
parent 2722704a2d
commit 448599e8d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ export const defaultUserSearch = { matches: [], isCaseSensitive: false, joint: S
export const createRolesQueries = (pool: CommonQueryMethods) => {
const countRoles = async (
search: Search = defaultUserSearch,
{ excludeRoleIds = [], roleIds = [] }: { excludeRoleIds?: string[]; roleIds?: string[] } = {}
{ excludeRoleIds = [], roleIds }: { excludeRoleIds?: string[]; roleIds?: string[] } = {}
) =>
pool.one<{ count: number }>(sql`
select count(*)