From e3f92a42c906db6dfd4d3e4e3dae709d3c27b808 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 29 Sep 2016 22:19:04 +0200 Subject: Send json as json --- modules/changes/changes.js | 4 ++-- 1 file 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; -- cgit v1.2.3-70-g09d2