tab indents the task; Makes it a child of previous task

This commit is contained in:
Abhishek Das
2013-04-10 23:40:42 +05:30
parent 98400285f9
commit 615fab272a
2 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ app.post('/tasks', function(req,res){
app.put('/tasks/:id', function(req,res){
var timestamp = Math.round((new Date()).getTime()/1000);
client.query("UPDATE tasks SET content = ?, timestamp = ? WHERE id = ?", [req.body.content,timestamp,req.body.id], function(err, task){
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){
req.body.timestamp = timestamp;
res.send(req.body);
});