var Like = require('../models/index.js').Like;

var create = function(props, callback) {
  Like.build(props)
  .save()
  .then(function(like) {
    callback(like);
  }).catch(function(err) {
    console.log(err);
  });
};

var findAll = function(callback) {
  Like.findAll().then(function(likes) {
    callback(likes);
  }).catch(function(err) {
    console.log(err);
  });
};

var findOne = function(query, callback) {
  Like.findOne(query).done(function(like) {
    console.log('🍊  Found one like in db:', query);
    callback(like);
  });
};

var findOrCreate = function(query, callback) {
  Like.findOrCreate(query).done(function(like) {
    console.log('🍊  Found one like in db:', query);
    callback(like);
  });
};

exports.create = create;
exports.findAll = findAll;
exports.findOne = findOne;
exports.findOrCreate = findOrCreate;
@@ -375,22 +375,21 @@
 %7D;%0A%0Avar 
-findOn
+updat
 e = func
@@ -500,32 +500,100 @@
 n db:', query);%0A
+    console.log(like, 'LIKEEEEEEE');%0A    like.update(%7Blike: true%7D);%0A
     callback(lik
@@ -848,24 +848,22 @@
 rts.
-findOne = findOn
+update = updat
 e;%0Ae

Add update function