parse-platform - 解析云函数响应错误
问题描述
我为演示目的编写了这个云函数。
Parse.Cloud.define('hello', function(req, res) {
res.success("hi");
});
但它总是返回此错误消息
{
"code": 141,
"error": "res.success is not a function"
}
怎么了?
解决方案
从解析服务器 3.0 开始,不再有响应对象。只需返回该值,它就会起作用。
Parse.Cloud.define(‘hello’, (req) => {
return ‘ok’;
});
有关更多信息,请参阅迁移指南:https ://github.com/parse-community/parse-server/blob/master/3.0.0.md
推荐阅读
- sql - ShareLock 和 ExclusiveLock 与 postgres 数据库
- algorithm - 如果条件复杂度 O(n * log(n))
- sql - 当给定日期和客户存在多个时间戳时,是否可以将每日客户频率过滤器减少到少于 2 个子查询?
- postgresql - Postgres - 扩展文件夹中的附加文件
- php - 如何使用自定义帖子类型+和结帐页面制作 woocommerce 商店页面
- c# - Unity根据参数'Type'设置Gameobject
- javascript - 条件异步瀑布
- javascript - 使用 Javascript 在子标签页之间导航的快速方法
- python - 我如何让基于 Web 的应用程序与带有套接字的 python 服务器通信
- c++ - c ++分离转向算法显示奇怪的结果