mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
Project Initialization
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { Controller, Get, Param, ParseUUIDPipe } from '@nestjs/common';
|
||||
import { ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
|
||||
import { BillingService } from './billing.service';
|
||||
|
||||
@ApiTags('billing')
|
||||
// @UseGuards(JwtAuthGuard) — TODO: integrate @edr/auth
|
||||
@Controller('billing')
|
||||
export class BillingController {
|
||||
constructor(private readonly billingService: BillingService) {}
|
||||
|
||||
@Get('invoices')
|
||||
@ApiOperation({ summary: 'List all invoices' })
|
||||
findAll() {
|
||||
return this.billingService.findAll();
|
||||
}
|
||||
|
||||
@Get('invoices/booking/:bookingId')
|
||||
@ApiOperation({ summary: 'List invoices for a booking' })
|
||||
findByBooking(@Param('bookingId', ParseUUIDPipe) bookingId: string) {
|
||||
return this.billingService.findByBooking(bookingId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user