Hozifa Elgharbawy commited on
Commit
a0db44f
·
1 Parent(s): 1e075e3
src/modules/users/modules/workouts/services/workouts.service.ts CHANGED
@@ -61,7 +61,7 @@ export class WorkoutService extends CrudService(Workout) {
61
  aiGenerated: true,
62
  name: `AI Generated Workout (${user.preferences.fitness_goal} - ${user.fitness_level}) - ${todayDate} ${currentTime}.${milliseconds}`,
63
  description: `This AI-generated workout plan, created on ${todayDate} at ${currentTime}.${milliseconds}, is tailored for your ${user.fitness_level.toLowerCase()} fitness level and ${user.preferences.fitness_goal.toLowerCase()} goal. It is designed to be performed ${user.preferences.workout_place === WorkoutPlace.GYM ? "at the gym" : "at home"} using your preferred equipment.`,
64
- type: "AI Generated",
65
  created_by: user._id,
66
  image: "https://placehold.co/300x400",
67
  fitness_level: user.fitness_level,
 
61
  aiGenerated: true,
62
  name: `AI Generated Workout (${user.preferences.fitness_goal} - ${user.fitness_level}) - ${todayDate} ${currentTime}.${milliseconds}`,
63
  description: `This AI-generated workout plan, created on ${todayDate} at ${currentTime}.${milliseconds}, is tailored for your ${user.fitness_level.toLowerCase()} fitness level and ${user.preferences.fitness_goal.toLowerCase()} goal. It is designed to be performed ${user.preferences.workout_place === WorkoutPlace.GYM ? "at the gym" : "at home"} using your preferred equipment.`,
64
+ type: "Equipment Diversity",
65
  created_by: user._id,
66
  image: "https://placehold.co/300x400",
67
  fitness_level: user.fitness_level,
src/resources/exercises.csv CHANGED
The diff for this file is too large to render. See raw diff
 
src/seeder/helpers/load-exercises-dataset.ts CHANGED
@@ -22,6 +22,7 @@ export interface IExerciseCSV {
22
  type: EType;
23
  sets: number;
24
  instructions: string;
 
25
  }
26
 
27
 
 
22
  type: EType;
23
  sets: number;
24
  instructions: string;
25
+ benefits: string;
26
  }
27
 
28
 
src/seeder/seeders/5-exercises.seeder.ts CHANGED
@@ -45,7 +45,16 @@ export default seederWrapper(Exercise, async () => {
45
  instructions: e.instructions,
46
  }
47
  ),
48
- benefits: "You will get stronger",
 
 
 
 
 
 
 
 
 
49
  targetMuscles: {
50
  primary: (await Muscle.findOne({ name: e.target }).exec())._id,
51
  secondary: (await Muscle.findOne({ name: e.target }).exec())._id,
 
45
  instructions: e.instructions,
46
  }
47
  ),
48
+ ...(
49
+ e.benefits === "" &&
50
+ {
51
+ benefits: "You will get stronger",
52
+ }
53
+ ||
54
+ {
55
+ benefits: e.benefits,
56
+ }
57
+ ),
58
  targetMuscles: {
59
  primary: (await Muscle.findOne({ name: e.target }).exec())._id,
60
  secondary: (await Muscle.findOne({ name: e.target }).exec())._id,