0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

feat(core): support searching organization by id

This commit is contained in:
Charles Zhao 2023-11-07 15:52:44 +08:00
parent 2bf7d784bf
commit 48c0e028af
No known key found for this signature in database
GPG key ID: 4858774754C92DF2

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);