mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
25 lines
727 B
TypeScript
25 lines
727 B
TypeScript
import { Controller, Get, Param, ParseUUIDPipe } from "@nestjs/common";
|
|
import { ApiOperation, ApiTags } from "@nestjs/swagger";
|
|
|
|
import { FreightAdmin } from "../../common/booking-guards";
|
|
import { BillingService } from "./billing.service";
|
|
|
|
@ApiTags("billing")
|
|
@Controller("billing")
|
|
@FreightAdmin()
|
|
export class BillingController {
|
|
constructor(private readonly billingService: BillingService) { }
|
|
|
|
@Get("invoices")
|
|
@ApiOperation({ summary: "List all invoices" })
|
|
findAll() {
|
|
return this.billingService.findAll();
|
|
}
|
|
|
|
@Get("invoices/:id")
|
|
@ApiOperation({ summary: "Get an invoice with its line items" })
|
|
findById(@Param("id", ParseUUIDPipe) id: string) {
|
|
return this.billingService.findById(id);
|
|
}
|
|
}
|