mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: pagination: add default value
This commit is contained in:
1 file changed
+1
-1
@@ -238,7 +238,7 @@ export async function apply(ctx: Context) {
|
||||
return res;
|
||||
},
|
||||
paginate<T>(cursor: FindCursor<T>, page: number, key: string) {
|
||||
return db.paginate(cursor, page, this.ctx.setting.get(`pagination.${key}`));
|
||||
return db.paginate(cursor, page, this.ctx.setting.get(`pagination.${key}`) || 20);
|
||||
},
|
||||
checkPerm(...args: bigint[]) {
|
||||
if (!this.user.hasPerm(...args)) {
|
||||
|
||||
Reference in new issue
Block a user