From 52b94a7adf4c773362ef754c562cbc0cdb844e23 Mon Sep 17 00:00:00 2001 From: David Schoonover Date: Mon, 16 Jul 2012 12:51:57 -0700 Subject: [PATCH] Fixes graph-list endpoint to work with changes to readJSONFiles --- src/server/controllers/graph.co | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) 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' -- 1.7.0.4