From da2a1713b13b31310843136eeaabe524c4eee42c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 3 Nov 2022 01:28:29 -0700 Subject: with relation --- routes/payments.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'routes') diff --git a/routes/payments.js b/routes/payments.js index 678b646c..999cba36 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -125,6 +125,11 @@ app.get("/payments", auth, async (req, res) => { model: db.Account, as: "account" }, + include: { + attrs: ["username", "profile"], + model: db.User, + as: "with" + }, limit, offset }); -- cgit v1.2.3