16 lines
430 B
TypeScript
16 lines
430 B
TypeScript
|
|
import { Controller, Get } from '@nestjs/common';
|
||
|
|
import { CatalogService } from './catalog.service';
|
||
|
|
import { ApiTags, ApiOperation } from '@nestjs/swagger';
|
||
|
|
|
||
|
|
@ApiTags('catalog')
|
||
|
|
@Controller('catalog')
|
||
|
|
export class CatalogController {
|
||
|
|
constructor(private catalogService: CatalogService) {}
|
||
|
|
|
||
|
|
@Get()
|
||
|
|
@ApiOperation({ summary: 'Get product catalog' })
|
||
|
|
async getCatalog() {
|
||
|
|
return this.catalogService.getProducts();
|
||
|
|
}
|
||
|
|
}
|