MCPcopy Create free account
hub / github.com/firebase/quickstart-js / addFakeRestaurant

Function addFakeRestaurant

firestore/scripts/PopulateFirestore.js:78–81  ·  view source on GitHub ↗
(restaurant)

Source from the content-addressed store, hash-verified

76 * database.
77 */
78const addFakeRestaurant = async (restaurant) => {
79 const restaurantRef = await addDoc(collection(db, 'restaurants'), restaurant);
80 addMockRating(restaurantRef.id, restaurant.avgRating);
81};
82
83/**
84 * A function to generate 20 random `Restaurant` objects. The definiton

Callers 1

addMockRestaurantsFunction · 0.85

Calls 1

addMockRatingFunction · 0.85

Tested by

no test coverage detected