diff --git a/docs/docs.go b/docs/docs.go index 6f0b677..82f7beb 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -498,6 +498,9 @@ const docTemplate = `{ }, "product_name": { "type": "string" + }, + "quantity": { + "type": "string" } } }, diff --git a/docs/swagger.json b/docs/swagger.json index a99fb2b..b38be6f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -491,6 +491,9 @@ }, "product_name": { "type": "string" + }, + "quantity": { + "type": "string" } } }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 2380081..25d8da4 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -239,6 +239,8 @@ definitions: type: object product_name: type: string + quantity: + type: string type: object product.getProductByIdResponse: properties: diff --git a/internal/database/product/product.go b/internal/database/product/product.go index 280d948..e70cd54 100644 --- a/internal/database/product/product.go +++ b/internal/database/product/product.go @@ -4,6 +4,7 @@ type Product struct { ID_ string `json:"_id" bson:"_id"` Brands string `json:"brands" bson:"brands"` ProductName string `json:"product_name" bson:"product_name"` + Quantity string `json:"quantity" bson:"quantity"` Nutriments struct { SaturatedFat float64 `json:"saturated-fat" bson:"saturated-fat,truncate"` SodiumValue float64 `json:"sodium_value" bson:"sodium_value,truncate"`