mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix: refactor parameter extraction in listWithPagination function
This commit is contained in:
parent
c34a923279
commit
a458fd6d7c
@ -30,7 +30,9 @@ function findArgs(ctx: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function listWithPagination(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);
|
const repository = getRepositoryFromParams(ctx);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user