Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { parse } from 'cookie';
import { json2csv } from 'json-2-csv';

import { getPaginationItems } from '../../../../../app/api/server/helpers/getPaginationItems';

Check failure on line 7 in apps/meteor/ee/server/apps/communication/endpoints/appLogsExportHandler.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

'getPaginationItems' is defined but never used
import type { AppsRestApi } from '../rest';
import { makeAppLogsQuery } from './lib/makeAppLogsQuery';
import { APIClass } from '../../../../../app/api/server/ApiClass';
Expand Down Expand Up @@ -74,13 +74,19 @@
return api.notFound(`No App found by the id of: ${this.urlParams.id}`);
}

const { count } = await getPaginationItems(this.queryParams);
let count = 100;

if (this.queryParams.count !== undefined && this.queryParams.count !== null) {
count = parseInt(String(this.queryParams.count || 100));
}

const { sort } = await this.parseJsonQuery();


Check failure on line 85 in apps/meteor/ee/server/apps/communication/endpoints/appLogsExportHandler.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Delete `⏎`
const options = {
sort: sort || { _updatedAt: -1 },
skip: 0,
limit: Math.min(count || 100, 2000),
limit: Math.min(count, 2000),
};

let query: ReturnType<typeof makeAppLogsQuery>;
Expand Down
Loading