Webhooks: Completar integracion backend-frontend
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m1s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m1s
- Inicializar webhookDispatcher en plugin de servidor - Conectar pagina de webhooks con API - Agregar selector de instancias en formulario - Corregir bug en toast de handleSaved
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
/**
|
||||
* Nitro plugin to initialize Baileys manager on server start
|
||||
* Nitro plugin to initialize Baileys manager and Webhook dispatcher on server start
|
||||
*/
|
||||
import { baileysManager } from '../services/baileys/manager'
|
||||
import { webhookDispatcher } from '../services/webhooks/dispatcher'
|
||||
|
||||
export default defineNitroPlugin(async () => {
|
||||
console.log('[Plugin] Initializing Baileys Manager...')
|
||||
@@ -12,7 +13,11 @@ export default defineNitroPlugin(async () => {
|
||||
try {
|
||||
await baileysManager.initialize()
|
||||
console.log('[Plugin] Baileys Manager initialized successfully')
|
||||
|
||||
// Initialize webhook dispatcher after baileys manager
|
||||
await webhookDispatcher.initialize()
|
||||
console.log('[Plugin] Webhook Dispatcher initialized successfully')
|
||||
} catch (error) {
|
||||
console.error('[Plugin] Failed to initialize Baileys Manager:', error)
|
||||
console.error('[Plugin] Failed to initialize:', error)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user