【发布时间】:2019-11-01 00:36:06
【问题描述】:
我正在尝试使用谷歌云控制台来测试云功能。下面是一个sn-p。
exports.requestCreated = functions.firestore
.document('users/{userId}/requests/{requestId}')
.onWrite((change, context) => {
// execute operation
});
我尝试过各种 JSON 数据的组合。例如
{"userId":"Xl86pqOpF9T2MAn12p24OJAfYJW2","requestId":"abc1234"}
但我在日志中不断收到以下语句:
Request created by {userId}
实际的userId 并未从控制台中的 JSON 数据中读取。你能帮忙吗?
【问题讨论】:
-
userId来自哪里?
标签: node.js google-cloud-platform google-cloud-functions