From ebb7cd58dfda7d08246a9abdaa0aea1c346954dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Ranum?= Date: Mon, 29 Aug 2016 10:29:14 +0200 Subject: [PATCH] fix(list): wrap checkins in data property --- index.js | 2 +- test/acceptance/lists.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 62d4e7a..0eedd30 100644 --- a/index.js +++ b/index.js @@ -158,7 +158,7 @@ router.get('/lister/:liste/stats', notImplementedYet); router.get('/lister/:liste/logg', (req, res) => { Checkin.getCheckinsForList(req.params.liste) .then(checkins => { - res.json({ checkins }); + res.json({ data: { checkins } }); }); }); diff --git a/test/acceptance/lists.js b/test/acceptance/lists.js index 03915a8..58c2970 100644 --- a/test/acceptance/lists.js +++ b/test/acceptance/lists.js @@ -90,7 +90,7 @@ describe('POST /lister/:liste/*', () => { .set('X-User-Token', 'abc123') .expect(200) .end((req, res) => { - assert.equal(res.body.checkins.length, 2); + assert.equal(res.body.data.checkins.length, 2); done(); }); });