From faeeecdf04785e41ee0e7b9a1f6a8c91cd5135e2 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 22 Dec 2013 12:09:44 -0700 Subject: [PATCH] add GET /api/v2/content which lists all item definitions @magicmicky --- src/controllers/user.js | 4 ++++ src/routes/apiv2.js | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/controllers/user.js b/src/controllers/user.js index 90ff07fd38..705b87bd15 100644 --- a/src/controllers/user.js +++ b/src/controllers/user.js @@ -17,6 +17,10 @@ var api = module.exports; // api.purchase // Shared.ops +api.getContent = function(req, res, next) { + res.json(shared.content); +} + /* ------------------------------------------------------------------------ Tasks diff --git a/src/routes/apiv2.js b/src/routes/apiv2.js index b80c092c3a..bfb4c8c5db 100644 --- a/src/routes/apiv2.js +++ b/src/routes/apiv2.js @@ -30,6 +30,9 @@ router.get('/status', function(req, res) { // User // --------------------------------- +// List all keys and objects in content.coffee that clients ned to know about +router.get('/content', user.getContent); + // Data Export router.get('/export/history',auth.auth,dataexport.history); //[todo] encode data output options in the data controller and use these to build routes