@@ -41,10 +41,6 @@ export class CommercialPropertyListingsController {
|
||||
findTotal(@Request() req, @Body() criteria: CommercialPropertyListingCriteria): Promise<number> {
|
||||
return this.listingsService.getCommercialPropertiesCount(criteria, req.user as JwtUser);
|
||||
}
|
||||
// @Get('states/all')
|
||||
// getStates(): any {
|
||||
// return this.listingsService.getStates();
|
||||
// }
|
||||
@Post()
|
||||
async create(@Body() listing: any) {
|
||||
this.logger.info(`Save Listing`);
|
||||
@@ -55,13 +51,13 @@ export class CommercialPropertyListingsController {
|
||||
this.logger.info(`Save Listing`);
|
||||
return await this.listingsService.updateCommercialPropertyListing(listing.id, listing);
|
||||
}
|
||||
@Delete(':id/:imagePath')
|
||||
@Delete('listing/:id/:imagePath')
|
||||
deleteById(@Param('id') id: string, @Param('imagePath') imagePath: string) {
|
||||
this.listingsService.deleteListing(id);
|
||||
this.fileService.deleteDirectoryIfExists(imagePath);
|
||||
}
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Delete('favorites/:id')
|
||||
@Delete('favorite/:id')
|
||||
deleteFavorite(@Request() req, @Param('id') id: string) {
|
||||
this.listingsService.deleteFavorite(id, req.user as JwtUser);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user