Hozifa Elgherbawy commited on
Commit
0742351
·
unverified ·
2 Parent(s): 8250e27 d5b5483

Merge pull request #78 from Modarb-Ai-Trainer:Populate

Browse files

feat: Populate target muscles and equipments in user-registered-workouts API response

src/modules/users/modules/user-registered-workouts/controllers/user-registered-workouts.controller.ts CHANGED
@@ -78,7 +78,11 @@ export class userRegisteredWorkoutsController extends BaseController {
78
  {
79
  populateArray: [
80
  { path: "workout", select: ["-weeks"] },
81
- { path: "weeks.days.exercises" },
 
 
 
 
82
  ],
83
  }
84
  );
 
78
  {
79
  populateArray: [
80
  { path: "workout", select: ["-weeks"] },
81
+ { path: "weeks.days.exercises", populate: [
82
+ { path: "targetMuscles.primary" },
83
+ { path: "targetMuscles.secondary" },
84
+ { path: "equipments" }
85
+ ]}
86
  ],
87
  }
88
  );