From 4988bd1bc913fd4b717602e32fba113608681010 Mon Sep 17 00:00:00 2001 From: Samuel Gravis Date: Wed, 30 Aug 2023 11:20:13 +0200 Subject: [PATCH] fix: Fix issue with db calls in team logs command --- src/command-handlers/teamLogs.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/command-handlers/teamLogs.ts b/src/command-handlers/teamLogs.ts index ca68422d..1e917f96 100644 --- a/src/command-handlers/teamLogs.ts +++ b/src/command-handlers/teamLogs.ts @@ -1,5 +1,4 @@ import winston from 'winston'; -import { connectAndPrepare } from '../modules/database'; import { StartAuditLogsQueryParams, startAuditLogsQuery, getAuditLogQueryResults } from '../endpoints'; import { getTeamDeviceCredentials, jsonToCsv, epochTimestampToIso } from '../utils'; import { GenericLog } from '../types/logs'; @@ -17,7 +16,6 @@ export const runTeamLogs = async (options: { const { start, type, category } = options; const end = options.end === 'now' ? Date.now().toString() : options.end; - const { db } = await connectAndPrepare({ autoSync: false }); let logs = await getAuditLogs({ teamDeviceCredentials, startDateRangeUnix: parseInt(start), @@ -25,7 +23,6 @@ export const runTeamLogs = async (options: { logType: type, category, }); - db.close(); if (options.humanReadable) { logs = logs.map((log) => {