This repository has been archived by the owner on Mar 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
43 lines (31 loc) · 1.48 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
Rolodex, high-performance email list software.
Copyright (c) Internet Freedom Foundation.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
api.js - HTTP endpoints
/r Redirecting routes, requires signed token, typically from email
/w XHR routes, token optional, typically from the web
/s Server-to-server calls (webhooks), no token expected.
*/
const router = require('express').Router();
router.get('/r/verify', require('./routes/verify'));
router.get('/r/unsubscribe', require('./routes/unsubscribe'));
router.get('/r/open', require('./routes/open'));
router.get('/r/click', require('./routes/click'));
router.post('/w/subscribe', require('./routes/subscribe'));
router.post('/w/:action', require('./routes/action'));
router.use('/s/bounce', require('./routes/sesWebhook'));
router.use('/s/complaint', require('./routes/sesWebhook'));
router.use('/s/razorpay', require('./routes/rpWebhook'));
module.exports = router;