javascript - 无法创建内置环回用户模型的继承者。只是在回调中返回空对象
问题描述
这是创建新用户的代码。但它不起作用。在环回资源管理器中,一切正常。
Participant.create({
email: `${body.login}@yandex.by`,
password: '1111',
}, function(err, user) {
console.log(user);//undefined
此代码也不起作用。
request.post('http://localhost:3000/api/Participants', {
form: {
email: `${body.login}@yandex.by`,
password: '1111',
},
}, function(err, user) {
console.log(user);//undefined
解决方案
推荐阅读
- promise - 常规函数内的 Karma/Jasmin Test Promise 错误
- java - 无法在 Spring 项目中注册自定义实体
- java - 序列化/反序列化 POJO 包含带有 GSON 的特定枚举(不是字符串枚举)
- python - Python,将请求的结果解析为 xml
- pyspark - 在 Python 中将 Spark 流式传输到 PowerBI
- android - authorize.net 支付网关集成?
- api - 使用 REST API 获取知识文章记录类型
- java - jsonarray 到字符串的转换
- python - 我总是用我的模型预测负值
- ruby-on-rails - 在传递给部分的集合成员上执行的块正在执行两次,ruby on rails