Add pubsub subscription to trigger webhook

This commit is contained in:
Hongbo Wu
2022-05-26 10:35:43 +08:00
parent c84668e6b0
commit 7b0ebb9dbf
2 changed files with 88 additions and 0 deletions

View File

@ -42,6 +42,7 @@ import { corsConfig } from './utils/corsConfig'
import { initElasticsearch } from './elastic'
import { uploadServiceRouter } from './routers/svc/upload'
import rateLimit from 'express-rate-limit'
import { webhooksServiceRouter } from './routers/svc/webhooks'
const PORT = process.env.PORT || 4000
@ -111,6 +112,7 @@ export const createApp = (): {
app.use('/svc/pubsub/newsletters', newsletterServiceRouter())
app.use('/svc/pubsub/emails', emailsServiceRouter())
app.use('/svc/pubsub/upload', uploadServiceRouter())
app.use('/svc/pubsub/webhooks', webhooksServiceRouter())
app.use('/svc/reminders', remindersServiceRouter())
app.use('/svc/pdf-attachments', pdfAttachmentsRouter())