summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2023-11-18 10:57:38 +0100
committerTom Smeding <tom@tomsmeding.com>2023-11-18 10:57:38 +0100
commit616a059ee11b1450401bd4a6d2ce0afa4671cd3c (patch)
tree864180781af4f32a46c364d9c92433051867f963
parent6041d2095c66e5849e8a2c03177e106498d812d8 (diff)
Fix bug some more
-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;