not-found page, #85, client logging

This commit is contained in:
2024-08-13 19:06:32 +02:00
parent 1f8febc479
commit a8bb163acf
15 changed files with 233 additions and 185 deletions

View File

@@ -0,0 +1,17 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { lastValueFrom } from 'rxjs';
import { LogMessage } from '../../../../bizmatch-server/src/models/main.model';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root',
})
export class LogService {
private apiBaseUrl = environment.apiBaseUrl;
constructor(private http: HttpClient) {}
async log(message: LogMessage): Promise<void> {
lastValueFrom(this.http.post(`${this.apiBaseUrl}/bizmatch/log`, message));
}
}