fix inputnumber, Umbau auf redis-om, Neubenamung

This commit is contained in:
2024-03-11 18:27:43 +01:00
parent 6ad40b6dca
commit be146fdc6a
25 changed files with 1830 additions and 224 deletions

View File

@@ -0,0 +1,49 @@
import { Body, Controller, Delete, Get, Inject, Param, Post, Put } from '@nestjs/common';
import { FileService } from '../file/file.service.js';
import { convertStringToNullUndefined } from '../utils.js';
import { ListingsService } from './listings.service.js';
import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
import { Logger } from 'winston';
@Controller('business-listings')
export class BusinessListingsController {
constructor(private readonly listingsService:ListingsService,@Inject(WINSTON_MODULE_PROVIDER) private readonly logger: Logger) {
}
@Get()
findAll(): any {
return this.listingsService.getAllBusinessListings();
}
@Get(':id')
findById(@Param('id') id:string): any {
return this.listingsService.getBusinessListingById(id);
}
// @Get(':type/:location/:minPrice/:maxPrice/:realEstateChecked')
// find(@Param('type') type:string,@Param('location') location:string,@Param('minPrice') minPrice:string,@Param('maxPrice') maxPrice:string,@Param('realEstateChecked') realEstateChecked:boolean): any {
// return this.listingsService.find(type,location,minPrice,maxPrice,realEstateChecked);
// }
@Post('search')
find(@Body() criteria: any): any {
return this.listingsService.findBusinessListings(criteria);
}
/**
* @param listing creates a new listing
*/
@Post()
save(@Body() listing: any){
this.logger.info(`Save Listing`);
this.listingsService.saveListing(listing)
}
/**
* @param id deletes a listing
*/
@Delete(':id')
deleteById(@Param('id') id:string){
this.listingsService.deleteBusinessListing(id)
}
}