diff options
Diffstat (limited to 'lib/index.js')
| -rw-r--r-- | lib/index.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/index.js b/lib/index.js index a9db423..781ac04 100644 --- a/lib/index.js +++ b/lib/index.js @@ -30,11 +30,6 @@ site.init = function(){ console.log('plop listening at http://5.k:%s', server.address().port) }) - app.get("/p/get/random", function(req, res){ - db.getRandom().then(function(img){ - res.json(img) - }) - }) app.get("/p/list/", function(req, res){ limit = parseInt(req.params.limit) if (isNaN(limit)) limit = 20 @@ -45,6 +40,16 @@ site.init = function(){ res.json(img) }) }) + app.get("/p/get/random", function(req, res){ + db.getRandom().then(function(img){ + res.json(img) + }) + }) + app.get("/p/get/randomascii", function(req, res){ + db.getRandomAscii().then(function(img){ + res.json(img) + }) + }) app.get("/p/get/", function(req, res){ db.getLatest().then(function(img){ res.json(img) @@ -78,12 +83,6 @@ site.init = function(){ }) }) - app.get("/p/get/randomascii", function(req, res){ - db.getRandomAscii().then(function(img){ - res.json(img) - }) - }) - /* shaderblaster / asciiblaster apis */ app.post("/cgi-bin/im/shader/upload", multer_upload.single('qqfile'), function(req, res){ var now = Math.floor(Date.now() / 1000) |
