actual fix
This commit is contained in:
parent
254a30ff93
commit
c3a41d2b32
Binary file not shown.
@ -160,14 +160,15 @@ export default function FitnessProfileScreen() {
|
||||
const token = await getToken();
|
||||
|
||||
// Prepare data with userId and convert fitnessGoal to fitnessGoals array
|
||||
// Convert empty strings to undefined for optional enum fields
|
||||
const dataToSave = {
|
||||
userId: userId,
|
||||
height: profileData.height,
|
||||
weight: profileData.weight,
|
||||
age: profileData.age,
|
||||
gender: profileData.gender,
|
||||
gender: profileData.gender || undefined,
|
||||
fitnessGoals: profileData.fitnessGoal ? [profileData.fitnessGoal] : [],
|
||||
activityLevel: profileData.activityLevel,
|
||||
activityLevel: profileData.activityLevel || undefined,
|
||||
medicalConditions: profileData.medicalConditions,
|
||||
allergies: profileData.allergies,
|
||||
injuries: profileData.injuries,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user