This commit is contained in:
Flummi 2016-08-16 20:28:44 +02:00
parent 788b8a3990
commit e59651f93f

View File

@ -277,7 +277,7 @@ http.createServer((req, res) => {
else if(filePath == "./random") { 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", null, (err, rows, fields) => {
res.writeHead(301, { res.writeHead(301, {
Location: req.headers.host + '/' + rows[0][0].id Location: req.headers.host + '/' + rows[0].id
}); });
res.end(); res.end();
}); });