This commit is contained in:
Flummi 2016-08-16 20:34:36 +02:00
parent c5dd7b6a65
commit 30b5b6839d

View File

@ -275,9 +275,10 @@ http.createServer((req, res) => {
});
}
else if(filePath == "./random") {
sql.query("select `id` from `f0ck`.`items` order by rand() limit 1", null, (err, rows, fields) => {
sql.query("select `id` from `f0ck`.`items` order by rand() limit 1", (err, rows, fields) => {
res.writeHead(301, {
Location: '/' + rows[0].id
'Cache-Control': 'no-cache, public',
'Location': '/' + rows[0].id
});
res.end();
});