mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-07-23 12:40:25 +08:00
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:
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user