Hozifa Elgherbawy commited on
Commit
8a41979
·
unverified ·
2 Parent(s): 9a7208c 5bd994f

Merge pull request #70 from Modarb-Ai-Trainer:update

Browse files

chore: Add id field to ingredient, meal, and mealPopulate serializers

src/common/serializers/ingredient.serialization.ts CHANGED
@@ -3,6 +3,10 @@ import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-proper
3
 
4
 
5
  export class IngredientSerialization {
 
 
 
 
6
  @Expose()
7
  @SwaggerResponseProperty({ type: "string" })
8
  name: string;
 
3
 
4
 
5
  export class IngredientSerialization {
6
+ @Expose({ name: "_id" })
7
+ @SwaggerResponseProperty({ type: "string" })
8
+ id: string;
9
+
10
  @Expose()
11
  @SwaggerResponseProperty({ type: "string" })
12
  name: string;
src/common/serializers/meal.serialization.ts CHANGED
@@ -3,6 +3,10 @@ import { SwaggerResponseProperty } from "@lib/decorators/swagger-response-proper
3
 
4
 
5
  export class MealSerialization {
 
 
 
 
6
  @Expose()
7
  @SwaggerResponseProperty({ type: "string" })
8
  name: string;
 
3
 
4
 
5
  export class MealSerialization {
6
+ @Expose({ name: "_id" })
7
+ @SwaggerResponseProperty({ type: "string" })
8
+ id: string;
9
+
10
  @Expose()
11
  @SwaggerResponseProperty({ type: "string" })
12
  name: string;
src/common/serializers/mealPopulate.serialization.ts CHANGED
@@ -4,6 +4,10 @@ import { IngredientSerialization } from "./ingredient.serialization";
4
 
5
 
6
  export class MealPopulateSerialization {
 
 
 
 
7
  @Expose()
8
  @SwaggerResponseProperty({ type: "string" })
9
  name: string;
 
4
 
5
 
6
  export class MealPopulateSerialization {
7
+ @Expose({ name: "_id" })
8
+ @SwaggerResponseProperty({ type: "string" })
9
+ id: string;
10
+
11
  @Expose()
12
  @SwaggerResponseProperty({ type: "string" })
13
  name: string;