diff --git a/s/index.tpl.html b/s/index.tpl.html index ef7478d..53c2699 100644 --- a/s/index.tpl.html +++ b/s/index.tpl.html @@ -11,7 +11,7 @@
{% for item in items %} -
+
{% endfor %}
diff --git a/src/main.js b/src/main.js index 8338e41..3722626 100644 --- a/src/main.js +++ b/src/main.js @@ -267,9 +267,9 @@ http.createServer((req, res) => { if(filePath == "./index.html") { // mainpage var tpl = swig.compile(templates.index); var data = { items: [] }; - sql.query("select * from `f0ck`.`items` order by `id` desc", (err, rows, fields) => { + sql.query("select `id`,`mime` from `f0ck`.`items` order by `id` desc", (err, rows, fields) => { rows.forEach((e,i,a) => { - data.items.push( e.id ); + data.items.push({ "id": e.id, "mime": e.mime }); }); res.writeHead(200, { 'Content-Type': 'text/html' }); res.end(tpl(data), 'utf-8');