muh
This commit is contained in:
@ -275,9 +275,10 @@ 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", (err, rows, fields) => {
|
||||||
res.writeHead(301, {
|
res.writeHead(301, {
|
||||||
Location: '/' + rows[0].id
|
'Cache-Control': 'no-cache, public',
|
||||||
|
'Location': '/' + rows[0].id
|
||||||
});
|
});
|
||||||
res.end();
|
res.end();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user