Authored by 陈峰

node-lib和feed

@@ -46,9 +46,9 @@ const index = (req, res, next) => { @@ -46,9 +46,9 @@ const index = (req, res, next) => {
46 }); 46 });
47 }); 47 });
48 if (req.params[0] && req.params[0] === '/atom') { 48 if (req.params[0] && req.params[0] === '/atom') {
49 - return res.send(feed.render('atom-1.0')); 49 + return res.send(feed.atom1());
50 } 50 }
51 - return res.send(feed.render('rss-2.0')); 51 + return res.send(feed.rss2());
52 }).catch(next); 52 }).catch(next);
53 }; 53 };
54 const rss = (req, res, next, gmt) => { 54 const rss = (req, res, next, gmt) => {
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 "xml2js": "^0.4.17", 50 "xml2js": "^0.4.17",
51 "yoho-express-session": "^2.0.0", 51 "yoho-express-session": "^2.0.0",
52 "yoho-md5": "^2.0.0", 52 "yoho-md5": "^2.0.0",
53 - "yoho-node-lib": "=0.2.21", 53 + "yoho-node-lib": "=0.2.22",
54 "yoho-zookeeper": "^1.0.8" 54 "yoho-zookeeper": "^1.0.8"
55 }, 55 },
56 "devDependencies": { 56 "devDependencies": {