Question

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'

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top