문제

I'm trying to execute this (on 0.10.0-rc7):

User.js

afterCreate: function(values, next) {
    Token.create({
        hash: uuid.v4(),
        type: 'email',
        user: values.id
    }).done(function (err, token) {
            console.log(token);
            next();
        });
}

But I'm receiving an error: TypeError: Object [object Object] has no method 'done'

도움이 되었습니까?

해결책

.done() is deprecated in Waterline. Use .exec() instead.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top