diff --git a/backend/routes/rentals.js b/backend/routes/rentals.js index 4a3c403..862c9dd 100644 --- a/backend/routes/rentals.js +++ b/backend/routes/rentals.js @@ -315,12 +315,12 @@ router.post("/", authenticateToken, requireVerifiedEmail, async (req, res) => { { model: User, as: "owner", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, { model: User, as: "renter", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, ], }); @@ -385,12 +385,12 @@ router.put("/:id/status", authenticateToken, async (req, res) => { { model: User, as: "owner", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email", "stripeConnectedAccountId"], }, { model: User, as: "renter", - attributes: ["id", "firstName", "lastName", "stripeCustomerId"], + attributes: ["id", "firstName", "lastName", "email", "stripeCustomerId"], }, ], }); @@ -459,12 +459,12 @@ router.put("/:id/status", authenticateToken, async (req, res) => { { model: User, as: "owner", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email", "stripeConnectedAccountId"], }, { model: User, as: "renter", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, ], }); @@ -563,12 +563,12 @@ router.put("/:id/status", authenticateToken, async (req, res) => { { model: User, as: "owner", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email", "stripeConnectedAccountId"], }, { model: User, as: "renter", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, ], }); @@ -726,12 +726,12 @@ router.put("/:id/decline", authenticateToken, async (req, res) => { { model: User, as: "owner", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, { model: User, as: "renter", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, ], }); @@ -1126,12 +1126,12 @@ router.post("/:id/cancel", authenticateToken, async (req, res, next) => { { model: User, as: "owner", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, { model: User, as: "renter", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, ], }); @@ -1222,12 +1222,12 @@ router.post("/:id/mark-return", authenticateToken, async (req, res, next) => { { model: User, as: "owner", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email", "stripeConnectedAccountId"], }, { model: User, as: "renter", - attributes: ["id", "firstName", "lastName"], + attributes: ["id", "firstName", "lastName", "email"], }, ], });