From 0010cf64d91f0697af1c4b9acf99146beac38844 Mon Sep 17 00:00:00 2001 From: Guillermo Croppi Date: Tue, 28 Jan 2025 20:42:31 -0300 Subject: [PATCH] Enhance subdivision and city attributes in fetchOne method: include type, latitude, and longitude --- controllers/challengeController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/challengeController.js b/controllers/challengeController.js index ad556e0..ac5df2c 100644 --- a/controllers/challengeController.js +++ b/controllers/challengeController.js @@ -76,12 +76,12 @@ exports.fetchOne = async (req, res) => { { model: models.Subdivision, as: "subdivision", - attributes: ["id", "name"], + attributes: ["id", "name", "type", "latitude", "longitude"], include: [ { model: models.City, as: "city", - attributes: ["id", "name"], + attributes: ["id", "name", "latitude", "longitude" ], }, ], },