import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'; import { InvoiceService } from './invoice.service'; import { Invoice } from './entities/invoice.entity'; @Controller('invoice') export class InvoiceController { constructor(private readonly invoiceService: InvoiceService) {} @Post('create') async createInvoice(@Body() body:{userId:number, totalAmount:number}):Promise{ const { userId, totalAmount} = body return this.invoiceService.createInvoice(userId, totalAmount) } }