This commit is contained in:
Flummi 2017-01-13 23:06:33 +01:00
parent 89ef3de313
commit 90fc615aca

View File

@ -242,7 +242,7 @@ function Websrv(tlib) {
});
}
else if(url[2] == "latest") {
lib.sql.query("select max(stamp) from `f0ck`.`items` limit 1", (err, rows) => {
lib.sql.query("select * from `f0ck`.`items` order by `stamp` desc limit 1", (err, rows) => {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({latest: rows[0].stamp}), 'utf-8');
});