Atualização repositorio
This commit is contained in:
31
src/products/products.controller.ts
Normal file
31
src/products/products.controller.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/* eslint-disable prettier/prettier */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
/*
|
||||
https://docs.nestjs.com/controllers#controllers
|
||||
*/
|
||||
|
||||
import { Body, Controller, Get, Param, Post } from '@nestjs/common';
|
||||
import { ProductsService } from './products.service';
|
||||
import { ExposedProduct } from 'src/core/models/exposed-product.model';
|
||||
|
||||
@Controller('api/v1/products')
|
||||
export class ProductsController {
|
||||
|
||||
constructor(private readonly productsService: ProductsService) { }
|
||||
|
||||
@Get('products-ecommerce')
|
||||
async productsEcommerce() {
|
||||
return this.productsService.getProductsEcommerce();
|
||||
}
|
||||
|
||||
@Get('product-validation/:storeId/:filtro')
|
||||
async productValidation(@Param('storeId') storeId: string, @Param('filtro') filtro: string) {
|
||||
return this.productsService.productsValidation(storeId, filtro);
|
||||
}
|
||||
|
||||
@Post('exposed-product')
|
||||
async exposedProduct(@Body() exposedProduct: ExposedProduct) {
|
||||
return this.productsService.exposedProduct(exposedProduct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user