fix: refactor parameter extraction in listWithPagination function

This commit is contained in:
Zeke Zhang 2025-04-30 16:27:40 +08:00
parent c34a923279
commit a458fd6d7c

View File

@ -30,7 +30,9 @@ function findArgs(ctx: Context) {
}
async function listWithPagination(ctx: Context) {
const { page = DEFAULT_PAGE, pageSize = DEFAULT_PER_PAGE } = ctx.action.params;
const params = ctx.action.params;
const { values = {}, others } = params;
const { page = DEFAULT_PAGE, pageSize = DEFAULT_PER_PAGE } = { ...others, ...values };
const repository = getRepositoryFromParams(ctx);