diff --git a/packages/server/src/api/controllers/automation.js b/packages/server/src/api/controllers/automation.js index b4dd852273..49ec70fc65 100644 --- a/packages/server/src/api/controllers/automation.js +++ b/packages/server/src/api/controllers/automation.js @@ -20,7 +20,7 @@ const { } = require("@budibase/backend-core/context") const { events } = require("@budibase/backend-core") const { app } = require("@budibase/backend-core/cache") -const { logs } = require("@budibase/pro") +const { automations } = require("@budibase/pro") const { clearOldHistory } = require("../../automations/logging") const ACTION_DEFS = removeDeprecated(actions.ACTION_DEFINITIONS) @@ -198,7 +198,7 @@ exports.logSearch = async function (ctx) { let { automationId, status, page, startDate } = ctx.request.body // before querying logs, make sure old logs are cleared out await clearOldHistory() - ctx.body = await logs.automations.getLogs( + ctx.body = await automations.logs.getLogs( startDate, status, automationId, diff --git a/packages/server/src/automations/logging/index.ts b/packages/server/src/automations/logging/index.ts index cbb56a1abc..b61c65223e 100644 --- a/packages/server/src/automations/logging/index.ts +++ b/packages/server/src/automations/logging/index.ts @@ -9,7 +9,7 @@ import { Automation } from "../../definitions/common" import { app } from "@budibase/backend-core/cache" import { backOff } from "../../utilities" import * as env from "../../environment" -import { logs } from "@budibase/pro" +import { automations } from "@budibase/pro" import { AppMetadataErrors } from "@budibase/types" import { AutomationResults, AutomationStatus } from "@budibase/types" @@ -38,7 +38,7 @@ function getStatus(results: AutomationResults) { export async function clearOldHistory() { const db = getProdAppDB() try { - const expired = await logs.automations.getExpiredLogs() + const expired = await automations.logs.getExpiredLogs() const toDelete = expired.data.map((doc: any) => ({ _id: doc.id, _rev: doc.value.rev,