diff options
Diffstat (limited to 'routes/users.js')
| -rw-r--r-- | routes/users.js | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/routes/users.js b/routes/users.js index bcce9c14..56fdf31b 100644 --- a/routes/users.js +++ b/routes/users.js @@ -32,21 +32,23 @@ app.get( auth, ah(async (req, res) => { let user = req.user.get({ plain: true }); - let payments = await req.user.getPayments({ - where: { - account_id: user.account_id - }, - order: [["id", "DESC"]], - limit: 12, - include: [{ - model: db.Account, - as: "account" - }, - { - model: db.Payment, - as: "fee_payment" - }] - }); + let payments = await req.user.getPayments({ + where: { + account_id: user.account_id + }, + order: [["id", "DESC"]], + limit: 12, + include: [ + { + model: db.Account, + as: "account" + }, + { + model: db.Payment, + as: "fee_payment" + } + ] + }); user.accounts = await req.user.getAccounts(); user.payments = payments; res.send(user); |
