[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 <noreply@anthropic.com>
This commit is contained in:
parent
3f54669dde
commit
bdf8c878e8
@ -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');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user