-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Labels
Description
Related issues
[REQUIRED] Version info
node:
node -v
v10.16.3
v8.16.0
firebase-functions:
3.3.0
firebase-tools:
7.8.1
firebase-admin:
8.8.0
[REQUIRED] Test case
app.post(' /enquiry',(req,res)=>{
let batch = db.batch();
console.log("setting data");
batch.set(db.collection('cities').doc(city).collection('notifications').doc(notificationId.toString()),{
id:notificationId,
message:notificationString,
timestamp: timestamp
})
return batch.commit()
.then((result)=>{
console.log("sent", result);
return result;
})
.catch(err=>console.error("error",err))
})
[REQUIRED] Steps to reproduce
- write the route in express.js
- firebase serve or firebase deploy
3.hit the api end point
[REQUIRED] Expected behavior
console.log() function after setting the data in firestore should run and print sent
output:
setting data
sent writeTime[object]
[REQUIRED] Actual behavior
setting data
No error thrown
Were you able to successfully deploy your functions?
Yes
I ran locally as well as on cloud functions. logs are not getting printed but the function is getting executed and data is getting set on cloud firestore.I have tried to print the promise response after set function but couldn't do the same.
Crymzix