Work in progress on subscriptions
This commit is contained in:
parent
d9211377dd
commit
e73c0a8b28
42 changed files with 1558 additions and 678 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
const passport = require('../../lib/passport');
|
||||
const lists = require('../../models/lists');
|
||||
const subscriptions = require('../../models/subscriptions');
|
||||
const segments = require('../../models/segments');
|
||||
|
||||
const router = require('../../lib/router-async').create();
|
||||
|
||||
|
@ -34,5 +36,17 @@ router.deleteAsync('/lists/:listId', passport.loggedIn, passport.csrfProtection,
|
|||
return res.json();
|
||||
});
|
||||
|
||||
router.postAsync('/subscriptions-table/:listId', passport.loggedIn, async (req, res) => {
|
||||
return res.json(await subscriptions.listDTAjax(req.context, req.params.listId, req.body));
|
||||
});
|
||||
|
||||
router.getAsync('/segments/:listId', passport.loggedIn, async (req, res) => {
|
||||
return res.json(await segments.list(req.context, req.params.listId));
|
||||
});
|
||||
|
||||
router.postAsync('/segments-table/:listId', passport.loggedIn, async (req, res) => {
|
||||
return res.json(await segments.listDTAjax(req.context, req.params.listId, req.body));
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
Loading…
Add table
Add a link
Reference in a new issue