From 09dcea8d99c85c104df3e6967d0110b32eeb4169 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Thu, 28 Nov 2024 13:05:08 +0700 Subject: [PATCH] update limite to offset --- src/controllers/user.ts | 2 +- src/controllers/user_activity.ts | 2 +- src/controllers/user_refresh_token.ts | 2 +- src/controllers/user_roles.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/user.ts b/src/controllers/user.ts index d2292c4..d117247 100644 --- a/src/controllers/user.ts +++ b/src/controllers/user.ts @@ -83,7 +83,7 @@ export class UserController { const res_list = userRepository.createQueryBuilder() .where(whereAttr, whereVal) .orderBy(param.order_field, param.order_direction) - .skip(offset) + .offset(offset) .limit(param.limit); if (param.with_deleted) { diff --git a/src/controllers/user_activity.ts b/src/controllers/user_activity.ts index 78d0a15..aad89e8 100644 --- a/src/controllers/user_activity.ts +++ b/src/controllers/user_activity.ts @@ -86,7 +86,7 @@ export class UserActivityController { const res_list = userRepository.createQueryBuilder() .where(whereAttr, whereVal) .orderBy(param.order_field, param.order_direction) - .skip(offset) + .offset(offset) .limit(param.limit); if (param.with_deleted) { diff --git a/src/controllers/user_refresh_token.ts b/src/controllers/user_refresh_token.ts index 279431f..f5b5b25 100644 --- a/src/controllers/user_refresh_token.ts +++ b/src/controllers/user_refresh_token.ts @@ -78,7 +78,7 @@ export class UserRefreshTokenController { const res_list = repo.createQueryBuilder() .where(whereAttr, whereVal) .orderBy(param.order_field, param.order_direction) - .skip(offset) + .offset(offset) .limit(param.limit); if (param.with_deleted) { diff --git a/src/controllers/user_roles.ts b/src/controllers/user_roles.ts index 2893f74..2a8891c 100644 --- a/src/controllers/user_roles.ts +++ b/src/controllers/user_roles.ts @@ -82,7 +82,7 @@ export class UserRoleController { const res_list = repo.createQueryBuilder() .where(whereAttr, whereVal) .orderBy(param.order_field, param.order_direction) - .skip(offset) + .offset(offset) .limit(param.limit); if (param.with_deleted) {