Issues #47,#42, #35 resolved, request logging erweitert
This commit is contained in:
@@ -49,7 +49,8 @@ export class DetailsCommercialPropertyListingComponent {
|
||||
criteria: ListingCriteria;
|
||||
mailinfo: MailInfo;
|
||||
environment = environment;
|
||||
user: KeycloakUser;
|
||||
keycloakUser: KeycloakUser;
|
||||
user: User;
|
||||
listingUser: User;
|
||||
description: SafeHtml;
|
||||
ts = new Date().getTime();
|
||||
@@ -75,7 +76,11 @@ export class DetailsCommercialPropertyListingComponent {
|
||||
|
||||
async ngOnInit() {
|
||||
const token = await this.keycloakService.getToken();
|
||||
this.user = map2User(token);
|
||||
this.keycloakUser = map2User(token);
|
||||
if (this.keycloakUser) {
|
||||
this.user = await this.userService.getByMail(this.keycloakUser.email);
|
||||
this.mailinfo.sender = { name: `${this.user.firstname} ${this.user.lastname}`, email: this.user.email, phoneNumber: this.user.email, state: this.user.companyLocation };
|
||||
}
|
||||
this.listing = await lastValueFrom(this.listingsService.getListingById(this.id, 'commercialProperty'));
|
||||
this.listingUser = await this.userService.getById(this.listing.userId);
|
||||
this.description = this.sanitizer.bypassSecurityTrustHtml(this.listing.description);
|
||||
|
||||
Reference in New Issue
Block a user