From bdf8c878e8a6354a163658473ef3b6854d20772d Mon Sep 17 00:00:00 2001 From: Adrian Flores Cortes Date: Sun, 25 Jan 2026 03:13:46 -0600 Subject: [PATCH] [PROP-CORE-004] feat: Register payment-terminals module in app - Added PaymentTerminalsModule import and initialization - Registered routes: /api/v1/payment-terminals, /api/v1/mercadopago, /api/v1/clip - Registered webhooks: /webhooks/mercadopago, /webhooks/clip - Updated API info with new endpoints Co-Authored-By: Claude Opus 4.5 --- src/server.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server.ts b/src/server.ts index a78e577..30a6f09 100644 --- a/src/server.ts +++ b/src/server.ts @@ -13,6 +13,7 @@ import helmet from 'helmet'; import morgan from 'morgan'; import dotenv from 'dotenv'; import { AppDataSource } from './shared/database/typeorm.config'; +import { PaymentTerminalsModule } from './modules/payment-terminals'; // Cargar variables de entorno dotenv.config(); @@ -120,6 +121,9 @@ app.get(`/api/${API_VERSION}`, (_req, res) => { 'cash-flow': `/api/${API_VERSION}/cash-flow`, 'bank-reconciliation': `/api/${API_VERSION}/bank-reconciliation`, 'financial-reports': `/api/${API_VERSION}/financial-reports`, + 'payment-terminals': `/api/${API_VERSION}/payment-terminals`, + mercadopago: `/api/${API_VERSION}/mercadopago`, + clip: `/api/${API_VERSION}/clip`, }, }); }); @@ -344,6 +348,12 @@ async function bootstrap() { console.log('💵 Finance module inicializado'); + // Inicializar Payment Terminals Module + const paymentTerminals = new PaymentTerminalsModule({ dataSource: AppDataSource }); + app.use(`/api/${API_VERSION}`, paymentTerminals.router); + app.use('/webhooks', paymentTerminals.webhookRouter); + console.log('💳 Payment Terminals module inicializado'); + // Iniciar servidor app.listen(PORT, () => { console.log('🚀 Servidor iniciado');