Spaces:
Running
Running
Hozifa Elgharbawy
commited on
Commit
·
9b42531
1
Parent(s):
0bc00dd
update
Browse files
src/seeder/helpers/load-meals-dataset.ts
CHANGED
@@ -9,7 +9,7 @@ export interface IMealJson {
|
|
9 |
ProteinContent: number;
|
10 |
FatContent: number;
|
11 |
Images: string[];
|
12 |
-
|
13 |
}
|
14 |
|
15 |
const filePath = path.join(__dirname, '../../resources/meals.json');
|
|
|
9 |
ProteinContent: number;
|
10 |
FatContent: number;
|
11 |
Images: string[];
|
12 |
+
Category: string;
|
13 |
}
|
14 |
|
15 |
const filePath = path.join(__dirname, '../../resources/meals.json');
|
src/seeder/seeders/9-meals.seeder.ts
CHANGED
@@ -28,7 +28,7 @@ export default seederWrapper(Meal, async () => {
|
|
28 |
carbs: mealJson.CarbohydrateContent,
|
29 |
proteins: mealJson.ProteinContent,
|
30 |
fats: mealJson.FatContent,
|
31 |
-
type: mealJson.
|
32 |
} satisfies Partial<IMeal>)));
|
33 |
|
34 |
console.log('inserting meals...')
|
|
|
28 |
carbs: mealJson.CarbohydrateContent,
|
29 |
proteins: mealJson.ProteinContent,
|
30 |
fats: mealJson.FatContent,
|
31 |
+
type: mealJson.Category?.toLowerCase() as MealType,
|
32 |
} satisfies Partial<IMeal>)));
|
33 |
|
34 |
console.log('inserting meals...')
|