From: David Schoonover Date: Mon, 16 Jul 2012 19:51:57 +0000 (-0700) Subject: Fixes graph-list endpoint to work with changes to readJSONFiles X-Git-Url: http://git.less.ly:3516/?a=commitdiff_plain;h=52b94a7adf4c773362ef754c562cbc0cdb844e23;p=limn.git Fixes graph-list endpoint to work with changes to readJSONFiles --- diff --git a/src/server/controllers/graph.co b/src/server/controllers/graph.co index fa09476..479fe3d 100644 --- a/src/server/controllers/graph.co +++ b/src/server/controllers/graph.co @@ -49,12 +49,11 @@ class GraphController extends FileBackedController # if format is json, then return the graph JSON switch req.format case 'json' - pattern = "#{@dataDir}/*.json" Seq() # find list of data/graph/*.json files, send back the objects - .seq -> readJSONFilesAsync pattern, this - # remove filepath info - .seq (graphs) -> res.send _.values graphs + .seq readJSONFilesAsync, "#{@dataDir}/**", Seq + # remove filepath info from the hash of graphs + .seq -> res.send _.values it default res.render 'graph/index'