Merge branch 'requirejs' of https://github.com/floydpraveen/HackFlowy into floydpraveen-requirejs

Conflicts:
	public/index.html
	public/javascripts/views/task.js
	server.js
This commit is contained in:
Abhishek Das
2013-08-25 12:03:45 +05:30
15 changed files with 1937 additions and 66 deletions
+3 -2
View File
@@ -44,8 +44,9 @@ app.post('/tasks', function(req,res){
});
app.put('/tasks/:id', function(req,res){
console.log(req.body.is_completed);
var timestamp = Math.round((new Date()).getTime()/1000);
client.query("UPDATE tasks SET content = ?, timestamp = ?, parent_id = ? WHERE id = ?", [req.body.content,timestamp,req.body.parent_id,req.body.id], function(err, task){
client.query("UPDATE tasks SET content = ?, timestamp = ?, is_completed = ? WHERE id = ?", [req.body.content, timestamp, req.body.is_completed, req.body.id], function(err, task){
req.body.timestamp = timestamp;
res.send(req.body);
});
@@ -61,4 +62,4 @@ io.sockets.on('connection', function (socket) {
socket.on('task', function (data) {
socket.broadcast.emit('task', data);
});
});
});