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

@@ -12,6 +12,7 @@ import { ValidatedTextareaComponent } from '../../../components/validated-textar
import { ValidationMessagesService } from '../../../components/validation-messages.service';
import { HistoryService } from '../../../services/history.service';
import { ListingsService } from '../../../services/listings.service';
import { LogService } from '../../../services/log.service';
import { MailService } from '../../../services/mail.service';
import { SelectOptionsService } from '../../../services/select-options.service';
import { UserService } from '../../../services/user.service';
@@ -67,6 +68,7 @@ export class DetailsBusinessListingComponent {
public keycloakService: KeycloakService,
private validationMessagesService: ValidationMessagesService,
private messageService: MessageService,
private logService: LogService,
) {
this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
@@ -88,7 +90,8 @@ export class DetailsBusinessListingComponent {
this.listingUser = await this.userService.getByMail(this.listing.email);
this.description = this.sanitizer.bypassSecurityTrustHtml(this.listing.description);
} catch (error) {
console.log(error);
this.logService.log({ severity: 'error', text: error.error.message });
this.router.navigate(['notfound']);
}
}
ngOnDestroy() {