Image Upload, spinner aktivirt, listings & details überarbeitet
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user