Draft Mode inkl. Token implementiert
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { Controller, Get, Inject, Param } from '@nestjs/common';
|
||||
import { Controller, Inject } from '@nestjs/common';
|
||||
import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
||||
import { Logger } from 'winston';
|
||||
import { businesses, commercials } from '../drizzle/schema.js';
|
||||
import { ListingsService } from './listings.service.js';
|
||||
|
||||
@Controller('listings/undefined')
|
||||
@@ -11,13 +10,13 @@ export class UnknownListingsController {
|
||||
@Inject(WINSTON_MODULE_PROVIDER) private readonly logger: Logger,
|
||||
) {}
|
||||
|
||||
@Get(':id')
|
||||
async findById(@Param('id') id: string): Promise<any> {
|
||||
const result = await this.listingsService.findById(id, businesses);
|
||||
if (result) {
|
||||
return result;
|
||||
} else {
|
||||
return await this.listingsService.findById(id, commercials);
|
||||
}
|
||||
}
|
||||
// @Get(':id')
|
||||
// async findById(@Param('id') id: string): Promise<any> {
|
||||
// const result = await this.listingsService.findById(id, businesses);
|
||||
// if (result) {
|
||||
// return result;
|
||||
// } else {
|
||||
// return await this.listingsService.findById(id, commercials);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user