diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-09-29 22:19:04 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-09-29 22:19:04 +0200 |
commit | e3f92a42c906db6dfd4d3e4e3dae709d3c27b808 (patch) | |
tree | 1d457e51f832d27a3d3640bd06e8da17eb73160f | |
parent | e48b4ddffa8138045635ca2d3ee2e2efc1d15142 (diff) |
Send json as json
-rw-r--r-- | modules/changes/changes.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/changes/changes.js b/modules/changes/changes.js index c923741..b491e0b 100644 --- a/modules/changes/changes.js +++ b/modules/changes/changes.js @@ -129,7 +129,7 @@ module.exports=function(app,io,_moddir){ var list=[]; var url; for(url in urls)list.push(url); - res.send(JSON.stringify(list)); + res.json(list); }); app.get("/changes/url",function(req,res){ var url=req.query.url; @@ -138,7 +138,7 @@ module.exports=function(app,io,_moddir){ res.send("URL not found in watch list"); return; } - res.send(JSON.stringify(urls[url])); + res.json(urls[url]); }); app.post("/changes/url",function(req,res){ var url=req.body; |