fixed route
This commit is contained in:
parent
e59651f93f
commit
c5dd7b6a65
|
@ -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].id
|
Location: '/' + rows[0].id
|
||||||
});
|
});
|
||||||
res.end();
|
res.end();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user