From 77ccd4f9e6ff6bd43eb151e6f15e4c738ddcf8a7 Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Sat, 21 Jan 2012 01:37:22 +0100 Subject: Create something resembling valid HTML if no slideshow is explicitly selected. --- frontend.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend.js b/frontend.js index f9c7839..90fc67a 100644 --- a/frontend.js +++ b/frontend.js @@ -53,13 +53,14 @@ exports.start = function(config) { }); }); }); - config.app.get('*', function(req, res){ + config.app.get('*', function(req, res) { model.getAllSlides(function(slidesets) { - var body = '

Slideshows:

'; + var body = '

Slideshows:

'; for(var slideset in slidesets) { if(!slidesets.hasOwnProperty(slideset)) { continue; } body = body + ''+slidesets[slideset]+'
'; } + body = body + ''; res.setHeader('Content-Length', body.length); res.end(body); }); -- cgit v1.2.1