0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-31 22:51:25 -05:00

Merge pull request #4834 from logto-io/charles-log-7417-support-searching-organization-by-id

feat(core): support searching organization by id
This commit is contained in:
Charles Zhao 2023-11-08 12:31:56 +08:00 committed by GitHub
commit 414604838d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ export default function organizationRoutes<T extends AuthedRouter>(...args: Rout
}),
async (ctx, next) => {
const { query } = ctx.guard;
const search = parseSearchOptions(['name'], query);
const search = parseSearchOptions(['id', 'name'], query);
const { limit, offset } = ctx.pagination;
const [count, entities] = await organizations.findAll(limit, offset, search);