Image Upload, spinner aktivirt, listings & details überarbeitet

This commit is contained in:
2024-03-18 18:17:04 +01:00
parent 2b27ab8ba5
commit fd91adda57
31 changed files with 582 additions and 263 deletions

View File

@@ -11,11 +11,7 @@ export class CommercialPropertyListingsController {
constructor(private readonly listingsService:ListingsService,private fileService:FileService,@Inject(WINSTON_MODULE_PROVIDER) private readonly logger: Logger) {
}
@Get()
findAll(): any {
return this.listingsService.getAllCommercialListings();
}
@Get(':id')
findById(@Param('id') id:string): any {
return this.listingsService.getCommercialPropertyListingById(id);
@@ -43,14 +39,5 @@ export class CommercialPropertyListingsController {
this.listingsService.deleteCommercialPropertyListing(id)
}
@Post('uploadPropertyPicture/:id')
@UseInterceptors(FileInterceptor('file'),)
uploadFile(@UploadedFile() file: Express.Multer.File,@Param('id') id:string) {
this.fileService.storePropertyPicture(file,id);
}
@Get('images/:id')
getPropertyImagesById(@Param('id') id:string): any {
return this.fileService.getPropertyImages(id);
}
}