From 9529f831977568a398c39a9ea8cb65b97dae7eec Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 12 Nov 2022 03:32:19 -0800 Subject: request invoice relationship --- routes/requests.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'routes/requests.js') diff --git a/routes/requests.js b/routes/requests.js index affcfda7..0ef997b9 100644 --- a/routes/requests.js +++ b/routes/requests.js @@ -9,6 +9,11 @@ app.get("/request/:id", auth, async (req, res) => { let request = await db.Request.findOne({ where: { id: req.params.id }, include: [ + { + attributes: ["username", "profile"], + model: db.User, + as: "recipient" + }, { attributes: ["username", "profile"], model: db.User, -- cgit v1.2.3