chore: extend root eslint config in twenty-server (#5101)

Reopening @thaisguigon work from
https://github.com/twentyhq/twenty/pull/4781

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
This commit is contained in:
Weiko
2024-04-22 17:34:24 +02:00
committed by GitHub
parent b9a7eb5a98
commit fa4670b14d
66 changed files with 645 additions and 628 deletions

View File

@ -1,4 +1,4 @@
import { Injectable } from '@nestjs/common';
import { Injectable, Logger } from '@nestjs/common';
import { HttpService } from '@nestjs/axios';
import { Request } from 'express';
@ -12,6 +12,8 @@ import { CreateAnalyticsInput } from './dto/create-analytics.input';
@Injectable()
export class AnalyticsService {
private readonly logger = new Logger(AnalyticsService.name);
constructor(
private readonly environmentService: EnvironmentService,
private readonly httpService: HttpService,
@ -53,7 +55,11 @@ export class AnalyticsService {
try {
await this.httpService.axiosRef.post('/v1', data);
} catch {}
} catch {
this.logger.error('Failed to send analytics event');
return { success: false };
}
return { success: true };
}