首页 > 解决方案 > 无法创建内置环回用户模型的继承者。只是在回调中返回空对象

问题描述

这是创建新用户的代码。但它不起作用。在环回资源管理器中,一切正常。

 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

标签: javascriptnode.jsexpressloopbackjs

解决方案


推荐阅读