Firestore - batch.add is not a function

前端 未结 6 1129
滥情空心
滥情空心 2020-12-24 10:31

The documentation for Firestore batch writes lists only set(), update() and delete() as permitted operations.

Is there no way

6条回答
  •  时光取名叫无心
    2020-12-24 11:19

    Create the reference to the collection in which you are going to add the batch data We loop over the req.body using forEach and set the each data to be added in to the collection using the set method

    We commit the data and save the data to the collection using the commit method and on success ,send a success response.

    cloud firestore

提交回复
热议问题