- Replaced inline error throwing with NotFoundException in the BillingController to enhance error handling and provide clearer responses for missing WHMCS client mappings. - Updated multiple methods to ensure consistent error management across the controller, improving maintainability and clarity in API responses.
19 lines
659 B
TypeScript
19 lines
659 B
TypeScript
import { Module } from "@nestjs/common";
|
|
import { BillingController } from "./billing.controller.js";
|
|
import { WhmcsModule } from "@bff/integrations/whmcs/whmcs.module.js";
|
|
import { MappingsModule } from "@bff/modules/id-mappings/mappings.module.js";
|
|
import { InvoiceRetrievalService } from "./services/invoice-retrieval.service.js";
|
|
|
|
/**
|
|
* Billing Module
|
|
*
|
|
* Validation is handled by Zod schemas via Zod DTOs + the global ZodValidationPipe (APP_PIPE).
|
|
*/
|
|
@Module({
|
|
imports: [WhmcsModule, MappingsModule],
|
|
controllers: [BillingController],
|
|
providers: [InvoiceRetrievalService],
|
|
exports: [InvoiceRetrievalService],
|
|
})
|
|
export class BillingModule {}
|