fix further bugs

This commit is contained in:
2024-05-16 15:57:39 -05:00
parent 327aef0f21
commit e0ecea5af2
12 changed files with 135 additions and 101 deletions

View File

@@ -40,9 +40,10 @@ export class CommercialPropertyListingsController {
this.logger.info(`Save Listing`);
return await this.listingsService.updateListing(listing.id, listing, commercials);
}
@Delete(':id')
deleteById(@Param('id') id: string) {
@Delete(':id/:imagePath')
deleteById(@Param('id') id: string, @Param('imagePath') imagePath: string) {
this.listingsService.deleteListing(id, commercials);
this.fileService.deleteDirectoryIfExists(imagePath);
}
@Put('imageOrder/:id')