up
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { InvoiceService } from './invoice.service';
|
||||
import { CreateInvoiceDto } from './dto/create-invoice.dto';
|
||||
import { UpdateInvoiceDto } from './dto/update-invoice.dto';
|
||||
|
||||
@Controller('invoice')
|
||||
export class InvoiceController {
|
||||
constructor(private readonly invoiceService: InvoiceService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createInvoiceDto: CreateInvoiceDto) {
|
||||
return this.invoiceService.create(createInvoiceDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.invoiceService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.invoiceService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateInvoiceDto: UpdateInvoiceDto) {
|
||||
return this.invoiceService.update(+id, updateInvoiceDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.invoiceService.remove(+id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user