0
我試圖使用sequelize findOrCreate功能,但我發現了這個錯誤:錯誤:缺少選項參數中的屬性傳遞給findOrCreate。
Error: Missing where attribute in the options parameter passed to findOrCreate.
這是我的代碼:
var values = { slack_id: profile.id, name: profile.user };
var selector = { where: { slack_id: profile.id } };
User.findOrCreate(values, selector)
.then(function() {
return done(err, user);
});