diff options
Diffstat (limited to 'lib/index.js')
| -rw-r--r-- | lib/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js index 0cc00a9..fd226e5 100644 --- a/lib/index.js +++ b/lib/index.js @@ -38,9 +38,18 @@ site.init = function(){ app.get("/p/:id", function(req, res){}) app.get("/get/random", function(req, res){ + db.getRandom().then(function(img){ + res.json(img) + }) }) app.get("/get/latest", function(req, res){ + db.getLatest().then(function(img){ + res.json(img) + }) }) app.get("/get/:id", function(req, res){ + db.getImage(id).then(function(img){ + res.json(img) + }) }) }
\ No newline at end of file |
