Atualização repositorio

This commit is contained in:
eduardoestevao-appsoluti
2025-03-27 19:29:17 -03:00
parent b104682e1d
commit 41e56dda12
70 changed files with 15389 additions and 125 deletions

View File

@@ -0,0 +1,40 @@
/* 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 { OrdersPaymentService } from './orders-payment.service';
@Controller('api/v1/orders-payment')
export class OrdersPaymentController {
constructor(private readonly orderPaymentService: OrdersPaymentService){}
@Get('orders/:id')
findOrders(@Param('id') storeId: string) {
return this.orderPaymentService.findOrders(storeId, 0);
}
@Get('orders/:id/:orderId')
findOrder(@Param('id') storeId: string,
@Param('orderId') orderId: number) {
return this.orderPaymentService.findOrders(storeId, orderId);
}
@Get('payments/:id')
findPayments(@Param('id') orderId: number) {
return this.orderPaymentService.findPayments(orderId);
}
@Post('payments/create')
createPayment(@Body() data: any) {
return this.orderPaymentService.createPayment(data);
}
@Post('invoice/create')
createInvoice(@Body() data: any) {
return this.orderPaymentService.createInvoice(data);
}
}