From 7f3be1a0048f2ddd2cdda9ab17e2316a6bdeee0d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 30 Jun 2012 18:57:30 +0200 Subject: o Twitter Bootstrap <3. --- routes/index.js | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'routes') diff --git a/routes/index.js b/routes/index.js index bceafc3..a5b1bdc 100644 --- a/routes/index.js +++ b/routes/index.js @@ -13,15 +13,7 @@ function urlgenerator(req) { exports.index = function(req, res){ res.render('index', { title: 'Collection+JSON Explorer', - host: req.headers.host, - examples: [ - "minimal", - "collection", - "item", - "queries", - "template", - "error" - ] + host: req.headers.host }); }; @@ -41,7 +33,7 @@ exports.render = function(req, res) { try { parsedBody = JSON.parse(body); } catch(e) { sendErr('Unable to parse JSON: ' + e); } - var doc = collection_json.fromObject(parsedBody).collection; + var collection = collection_json.fromObject(parsedBody).collection; var isUrl = function(u) { try { var x = url.parse(u); @@ -55,10 +47,10 @@ exports.render = function(req, res) { isUrl: isUrl, urlgenerator: urlgenerator(req), url: req.query.url, - doc: doc, + collection: collection, headers: headers, - raw: body, - formattedRaw: JSON.stringify(parsedBody, null, ' ') }); + rawBody: body, + formattedBody: JSON.stringify(parsedBody, null, ' ') }); } }); }; -- cgit v1.2.3