Skip to content

Commit 9a4aa51

Browse files
committed
fix: typecheck
1 parent f008fb5 commit 9a4aa51

File tree

6 files changed

+14
-28
lines changed

6 files changed

+14
-28
lines changed

apps/api/src/controllers/insights.controller.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ export async function getPages(
9696
startDate: startDate,
9797
endDate: endDate,
9898
timezone,
99-
cursor: parsed.data.cursor,
100-
limit: Math.min(parsed.data.limit, 50),
10199
});
102100
}
103101

@@ -170,8 +168,6 @@ export function getOverviewGeneric(
170168
startDate: startDate,
171169
endDate: endDate,
172170
timezone,
173-
cursor: parsed.data.cursor,
174-
limit: Math.min(parsed.data.limit, 50),
175171
}),
176172
);
177173
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"lint": "biome check .",
2626
"lint:fix": "biome check --write .",
2727
"lint:workspace": "pnpm dlx sherif@latest",
28-
"typecheck": "pnpm -r typecheck",
28+
"typecheck": "pnpm -r --no-bail typecheck",
2929
"update-simple-git-hooks": "npx simple-git-hooks"
3030
},
3131
"simple-git-hooks": {

packages/db/src/engine/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ export async function executeAggregateChart(
127127
endDate: normalized.endDate,
128128
breakdowns: normalized.breakdowns,
129129
limit: normalized.limit,
130+
metric: normalized.metric,
131+
previous: normalized.previous,
130132
timezone,
131133
};
132134

@@ -251,6 +253,8 @@ export async function executeAggregateChart(
251253
endDate: previousPeriod.endDate,
252254
breakdowns: normalized.breakdowns,
253255
limit: normalized.limit,
256+
metric: normalized.metric,
257+
previous: normalized.previous,
254258
timezone,
255259
};
256260

packages/db/src/services/chart.service.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { uniq } from 'ramda';
21
import sqlstring from 'sqlstring';
32

43
import { DateTime, stripLeadingAndTrailingSlashes } from '@openpanel/common';
@@ -355,23 +354,10 @@ export function getAggregateChartSql({
355354
endDate,
356355
projectId,
357356
limit,
358-
timezone,
359357
}: Omit<IGetChartDataInput, 'interval' | 'chartType'> & {
360358
timezone: string;
361359
}) {
362-
const {
363-
sb,
364-
join,
365-
getWhere,
366-
getFrom,
367-
getJoins,
368-
getSelect,
369-
getOrderBy,
370-
getGroupBy,
371-
getWith,
372-
with: addCte,
373-
getSql,
374-
} = createSqlBuilder();
360+
const { sb, join, getJoins, with: addCte, getSql } = createSqlBuilder();
375361

376362
sb.where = getEventFiltersWhereClause(event.filters);
377363
sb.where.projectId = `project_id = ${sqlstring.escape(projectId)}`;

packages/db/src/services/pages.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { TABLE_NAMES, ch } from '../clickhouse/client';
22
import { clix } from '../clickhouse/query-builder';
33

4-
export interface IGetTopPagesInput {
4+
export interface IGetPagesInput {
55
projectId: string;
66
startDate: string;
77
endDate: string;
@@ -28,7 +28,7 @@ export class PagesService {
2828
endDate,
2929
timezone,
3030
search,
31-
}: IGetTopPagesInput): Promise<ITopPage[]> {
31+
}: IGetPagesInput): Promise<ITopPage[]> {
3232
// CTE: Get titles from the last 30 days for faster retrieval
3333
const titlesCte = clix(this.client, timezone)
3434
.select([

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)