UI Stat issue (#410)

* Fixed an issue on stats not sending from the UI
This commit is contained in:
Joseph Milazzo 2021-07-20 12:34:29 -05:00 committed by GitHub
parent 27be13a201
commit c2d84ed0eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View file

@ -18,12 +18,11 @@ export class StatsService {
constructor(private httpClient: HttpClient, private navService: NavService) { }
public async sendClientInfo() {
const data = await this.getInfo();
this.httpClient.post(this.baseUrl + 'stats/client-info', data);
public sendClientInfo(data: ClientInfo) {
return this.httpClient.post(this.baseUrl + 'stats/client-info', data);
}
private async getInfo(): Promise<ClientInfo> {
public async getInfo(): Promise<ClientInfo> {
const screenResolution = `${window.screen.width} x ${window.screen.height}`;
const browser = Bowser.getParser(window.navigator.userAgent);