feat: add multi-dashboard routing support for n8n
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m36s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m36s
- Refactor `sendToN8n` service to accept dynamic webhook URLs. - Update `order-status` controller to fan-out payload to both STATUS and GRAPHS webhooks. - Add new endpoints and controllers for stock and graphs updates (`/stock-update`, `/graphs-update`). - Maintain backward compatibility with existing `N8N_WEBHOOK_URL` environment variable.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { Router } from 'express';
|
||||
import { handleTinyOrderUpdate } from '../controllers/webhook.controller';
|
||||
import { handleTinyOrderUpdate, handleTinyStockUpdate, handleTinyGraphsUpdate } from '../controllers/webhook.controller';
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.post('/tiny/order-status', handleTinyOrderUpdate);
|
||||
router.post('/tiny/stock-update', handleTinyStockUpdate);
|
||||
router.post('/tiny/graphs-update', handleTinyGraphsUpdate);
|
||||
|
||||
export default router;
|
||||
export default router;
|
||||
Reference in New Issue
Block a user