Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Merge branch 'main' into improvement-ai-predict-filtration

Andrii Romasiun9bb8bb65a631
diff --cc apps/production/src/project/project.service.ts
index d6d32ff36,775ffc0cb..a312bfec9
--- a/apps/production/src/project/project.service.ts
+++ b/apps/production/src/project/project.service.ts
@@@ -72,6 -75,8 +75,7 @@@ import
import { ReportFrequency } from './enums'
import { nFormatter } from '../common/utils'
import { browserArgs } from '../og-image/og-image.service'
+ import { CreateProjectViewDto } from './dto/create-project-view.dto'
-import { TimeFrameQueryEnum } from './dto/get-prediction-query.dto'
import { AppLoggerService } from '../logger/logger.service'
dayjs.extend(utc)
@@@ -1353,7 -1358,22 +1357,22 @@@ export class ProjectService
return this.projectsRepository.findOne({ relations, where: { id } })
}
+ filterUnsupportedColumns(
+ filters: CreateProjectViewDto['filters'],
+ ): CreateProjectViewDto['filters'] {
+ if (!filters) {
+ return []
+ }
+
+ return _filter(
+ filters,
+ ({ column }) =>
+ _includes(ALL_COLUMNS, column) ||
+ _includes(TRAFFIC_METAKEY_COLUMNS, column),
+ )
+ }
+
- async sendPredictAiRequest(id: string, timeframe: TimeFrameQueryEnum) {
+ async sendPredictAiRequest(id: string) {
try {
const { data } = await firstValueFrom(
this.httpService.get('/predict/', {