问题描述
当我尝试使用本地主机 reactjs 提交表单时,它显示控制台错误:
“参数中缺少必需的键‘TableName’”,代码: “MissingrequiredParameter”,时间:“2021-01-06T06:40:42.102Z”}。
在前端和后端使用 AWS Amplify。
帖子调用是:
app.post('/contact',function(req,res) {
console.log(req);
var params = {
Tablename: process.env.STORAGE_FORMTABLE_NAME,Item: {
id: id(),name: req.body.name,email: req.body.email,phonenumber: req.body.phonenumber,address: req.body.address,message: req.body.message
}
}
docclient.put(params,function(err,data) {
if (err) res.json({
err
})
else res.json({
success: 'Contact created successfully!'
})
})
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)