Pregunta

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'

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top