history appending, finished up notes, #5232

This commit is contained in:
Julian Lam
2016-12-01 16:22:10 -05:00
parent d9d60c20bd
commit f1d144f15e
5 changed files with 98 additions and 12 deletions

View File

@@ -136,7 +136,8 @@ SocketFlags.update = function (socket, data, callback) {
}, payload);
flags.update(data.flagId, socket.uid, payload, next);
}
},
async.apply(flags.getHistory, data.flagId)
], callback);
};
@@ -160,6 +161,12 @@ SocketFlags.appendNote = function (socket, data, callback) {
}
flags.appendNote(data.flagId, socket.uid, data.note, next);
},
function (next) {
async.parallel({
"notes": async.apply(flags.getNotes, data.flagId),
"history": async.apply(flags.getHistory, data.flagId)
}, next);
}
], callback);
};