From d9fddacf887f9b962f795ce2f7678c07bbe76132 Mon Sep 17 00:00:00 2001 From: Wille Marcel Date: Thu, 13 Jul 2023 15:18:19 -0300 Subject: [PATCH] Include users' image in team members response --- src/models/team.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/team.js b/src/models/team.js index a1af6f2..5964d9a 100644 --- a/src/models/team.js +++ b/src/models/team.js @@ -182,9 +182,9 @@ async function getMembersPaginated(teamId, options) { // Base query for team members let query = db('member') .join('osm_users', 'member.osm_id', 'osm_users.id') - .select('member.osm_id as id', 'osm_users.name') + .select('member.osm_id as id', 'osm_users.name', 'osm_users.image') .where('member.team_id', teamId) - .groupBy('member.osm_id', 'osm_users.name') + .groupBy('member.osm_id', 'osm_users.name', 'osm_users.image') // Apply search if (options.search) {