From b849d16a683ba1b99e1923999db7762b334ae35a Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 28 Mar 2023 13:53:24 +0800 Subject: [PATCH] feat(nocodb): add hookLogCount and pass query to HookLog.list --- packages/nocodb/src/lib/services/hook.svc.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/services/hook.svc.ts b/packages/nocodb/src/lib/services/hook.svc.ts index cec60718db..78f70084ac 100644 --- a/packages/nocodb/src/lib/services/hook.svc.ts +++ b/packages/nocodb/src/lib/services/hook.svc.ts @@ -29,8 +29,8 @@ export async function hookList(param: { tableId: string }) { return await Hook.list({ fk_model_id: param.tableId }); } -export async function hookLogList(param: { hookId: string }) { - return await HookLog.list({ fk_hook_id: param.hookId }); +export async function hookLogList(param: { query: any; hookId: string }) { + return await HookLog.list({ fk_hook_id: param.hookId }, param.query); } export async function hookCreate(param: { @@ -110,3 +110,7 @@ export async function tableSampleData(param: { } return await populateSamplePayloadV2(model, false, param.operation); } + +export async function hookLogCount(param: { hookId: string }) { + return await HookLog.count({ hookId: param.hookId }); +}