Firebase Firestore Increment FieldValue does not increment

后端 未结 3 1194
抹茶落季
抹茶落季 2021-01-28 23:27

so i\'ve read all the documentation everything about increment a counter in a Firestore database. I have this code

const admin = require(\"firebase-admin\");
co         


        
3条回答
  •  Happy的楠姐
    2021-01-29 00:16

    Since you are using the Admin SDK, you should do as follows:

    count: admin.firestore.FieldValue.increment(1)
    

提交回复
热议问题