You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we can submit the Meal screen, without any FoodItem, nor carbs, nor meal name. The request is still getting to Firebase, even tho we are basically passing empty values of a Meal to our Firestore.
Objective
Add validation in the Meal screen, that when we click Register Meal, that we actually have data to send to our backend
Adjust Firebase security to deny meal requests that are missing required fields, such as:
Meal name
At least 1 FoodItem object in the foodItems field
Total Carbs
Total servings
Date created
Meal Type
Total times eaten
Note: For the Firebase security things we need this PR to be merged
Testing
Tests will be added inside the __tests__/firebase/meals.test.ts to cover for the firebase security rules
For now we will not make a UI test to check validation of the Meal screen
The text was updated successfully, but these errors were encountered:
Overview
Currently we can submit the
Meal
screen, without anyFoodItem
, nor carbs, nor meal name. The request is still getting to Firebase, even tho we are basically passing empty values of aMeal
to our Firestore.Objective
Meal
screen, that when we click Register Meal, that we actually have data to send to our backendFoodItem
object in thefoodItems
fieldTesting
__tests__/firebase/meals.test.ts
to cover for the firebase security rulesMeal
screenThe text was updated successfully, but these errors were encountered: