mark task*tags as modified (since Schema.Types.Mixed)

This commit is contained in:
Tyler Renelle
2013-12-15 13:23:27 -07:00
parent 786061d116
commit ab27840a61
2 changed files with 6 additions and 1 deletions
+4
View File
@@ -10983,10 +10983,14 @@ var process=require("__browserify_process");(function() {
return cb(null, req);
},
updateTask: function(req, cb) {
var _base;
if (!(req.params.id && user.tasks[req.params.id])) {
return typeof cb === "function" ? cb("Task not found") : void 0;
}
_.merge(user.tasks[req.params.id], req.body);
if (typeof (_base = user.tasks[req.params.id]).markModified === "function") {
_base.markModified('tags');
}
return typeof cb === "function" ? cb(null, req) : void 0;
},
deleteTask: function(req, cb) {
+2 -1
View File
@@ -243,7 +243,7 @@ api.newChatMessages = (messages, lastMessageSeen) ->
###
are any tags active?
###
api.noTags = (tags) -> _.isEmpty(tags) or _.isEmpty(_.filter( tags, (t) -> t ) )
api.noTags = (tags) -> _.isEmpty(tags) or _.isEmpty(_.filter(tags, (t)->t))
###
Are there tags applied?
@@ -336,6 +336,7 @@ api.wrap = (user) ->
updateTask: (req, cb) ->
return cb?("Task not found") unless req.params.id and user.tasks[req.params.id]
_.merge user.tasks[req.params.id], req.body
user.tasks[req.params.id].markModified? 'tags'
cb? null, req
deleteTask: (req, cb) ->