diff --git a/server.js b/server.js index 4ea7645..a5a7231 100644 --- a/server.js +++ b/server.js @@ -22,11 +22,12 @@ var getdata = function(callback) { if (err) { throw err; } else { - var klanddata = {}; - for(var i = 0; i < result.length; i++) { - klanddata[result[i]['date']] = result[i]['data']; - } - callback(klanddata); + result.sort(); + result.reverse(); + // for(var i = 0; i < result.length; i++) { + // klanddata[result[i]['date']] = result[i]['data']; + // } + callback(result); } }); } diff --git a/views/klandringer.ejs b/views/klandringer.ejs index 019f635..586a30c 100644 --- a/views/klandringer.ejs +++ b/views/klandringer.ejs @@ -6,12 +6,13 @@
<%-k["description"]%>
- <%=k["taber"]%> taber!
+ <% if (k["taber"] != "") { %>
+ <%=k["taber"]%> taber!
+ <% } %>