嘿,我怎样才能得到参数数据?
// this is serverless.yml
test_function:
handler: handler.test
events:
- http:
path: "registry/{some_data}"
method: get
request:
template:
application/json: >
{
"damn": "$input.params('some_data')"
}
// this is handle.js
module.exports.test= (event, context, cb) => {
cb(null, { bangke: 'Dorrrrr !!'+event.some_data});
};
但是 event.some_data print undefine 有人知道代码有什么问题吗?