API: get all lists
This commit is contained in:
parent
ae7a8eb72d
commit
5f18c9d44f
2 changed files with 35 additions and 0 deletions
|
@ -348,6 +348,22 @@ router.get('/subscriptions/:listId', (req, res) => {
|
|||
});
|
||||
});
|
||||
|
||||
router.get('/lists', (req, res) => {
|
||||
lists.quicklist((err, lists) => {
|
||||
if (err) {
|
||||
res.status(500);
|
||||
return res.json({
|
||||
error: err.message || err,
|
||||
data: []
|
||||
});
|
||||
}
|
||||
res.status(200);
|
||||
res.json({
|
||||
data: lists
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/lists/:email', (req, res) => {
|
||||
lists.getListsWithEmail(req.params.email, (err, lists) => {
|
||||
if (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue