Skip to content

Commit

Permalink
Telemetry request payload updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pandutibil committed Sep 13, 2023
1 parent 3a893af commit 70f9c2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/core/services/telemetry.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ export class TelemetryService {
constructor(private _http: HttpClient, private _browserDetectionService: BrowserDetectionService, private _deviceDetectionService: DeviceDetectionService) { }

saveTelemetry(eventData: any): Observable<any> {
let data = {
let data = [{
date: formatDateToDDMMYY(new Date()),
timestamp: new Date().getTime(),
userId: localStorage.getItem('user_id'),
deviceType: this._deviceDetectionService.getDeviceType(),
userLocation: "",
browserType: this._browserDetectionService.getBrowserType(),
...eventData
};
}];

return this._http.post<any>(`${environment.apiURL}/captureTelemetry`, data);
return this._http.post<any>(`${environment.apiURL}/captureTelemetry`, {data, isTelemetryWritingEnd: false});
}
}

0 comments on commit 70f9c2d

Please sign in to comment.