/datasources/all to take precedence before the :id lookup.
authordsc <dsc@wikimedia.org>
Fri, 13 Apr 2012 15:51:24 +0000 (08:51 -0700)
committerdsc <dsc@wikimedia.org>
Fri, 13 Apr 2012 15:51:24 +0000 (08:51 -0700)
lib/server/server.co

index e988ac6..477beca 100755 (executable)
@@ -143,8 +143,6 @@ app.configure ->
 
 Controller   = require './controller'
 app.controller require './controllers/graph'
-ds = app.controller require './controllers/datasource'
-# ds.map 'get', 'all', ds.allData.bind(ds)
 
 YAML_EXT_PAT = /\.ya?ml$/i
 app.get '/datasources/all', (req, res, next) ->
@@ -186,6 +184,9 @@ app.get '/datasources/all', (req, res, next) ->
             console.error that if err.stack
             res.send { error:String(err), partial_data:data }
 
+ds = app.controller require './controllers/datasource'
+# ds.map 'get', 'all', ds.allData.bind(ds)
+
 
 app.get '/', (req, res) ->
     res.render 'dashboard'