summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/changes/changes.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/changes/changes.js b/modules/changes/changes.js
index 0dd237d..1136a82 100644
--- a/modules/changes/changes.js
+++ b/modules/changes/changes.js
@@ -338,15 +338,12 @@ module.exports=function(app,io,_moddir){
res.send("URL not found in watch list");
return;
}
- var out=new Array(urls.length);
- for(var i=0;i<urls.length;i++){
- var tl=new Array(urls[i].timeline.length);
- for(var j=0;j<urls[i].timeline.length; j++){
- tl[i]=[urls[i].timeline[0],urls[i].timeline[1]];
- }
- out[i]={url:urls[i].url,timeline:tl};
+ var orig_tl=urls[url].timeline;
+ var tl=new Array(orig_tl.length);
+ for(var j=0;j<orig_tl.length;j++){
+ tl[i]=[orig_tl[0],orig_tl[1]];
}
- res.json(out);
+ res.json({url:urls[url].url,timeline:tl});
});
app.post("/changes/url",function(req,res){
var url=req.body;