Archived
Site settings -> Webhooks: admins add https endpoints and choose event types (registration created/paid/cancelled, payment received/refunded, ticket checked in, account created, event published). Events are noticed by a Prisma client extension so every write path is covered, re-checked before sending, and delivered as signed JSON (X-CrossEvents-Signature, HMAC-SHA256) with retries, a 30-day delivery log, Send test and Resend. Public https addresses only; each endpoint is added to the operator register; kids and volunteer tickets are never sent. New `webhooks` job. Migration 20261028160000_webhooks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
721 B
JavaScript
18 lines
721 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const { list, create, update, remove, rotateSecret, test, deliveries, resend } = require('../controllers/outboundWebhookController');
|
|
const { protect, admin } = require('../middleware/authMiddleware');
|
|
|
|
// Outbound webhooks (1.48.0): admins only. Payment provider webhooks *into* the site are /api/webhooks/<provider>.
|
|
router.use(protect, admin);
|
|
router.get('/', list);
|
|
router.post('/', create);
|
|
router.post('/deliveries/:id/resend', resend);
|
|
router.put('/:id', update);
|
|
router.delete('/:id', remove);
|
|
router.post('/:id/rotate-secret', rotateSecret);
|
|
router.post('/:id/test', test);
|
|
router.get('/:id/deliveries', deliveries);
|
|
|
|
module.exports = router;
|