mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +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;
|
return res;
|
||||||
},
|
},
|
||||||
paginate<T>(cursor: FindCursor<T>, page: number, key: string) {
|
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[]) {
|
checkPerm(...args: bigint[]) {
|
||||||
if (!this.user.hasPerm(...args)) {
|
if (!this.user.hasPerm(...args)) {
|
||||||
|
|||||||
Reference in new issue
Block a user