Skip to content
Browse files

Fix spacing.

  • Loading branch information...
1 parent 652c79c commit 7e3b2e99581ee576db60e54e3518ecf8b6acc012 @topfunky committed Feb 12, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 bands.coffee
View
6 bands.coffee
@@ -60,13 +60,11 @@ appServer.addRoute "^/band$", (req, res) ->
bandNodePath = '/bands/' + couchUtil.couchKeyify( bandName )
membersQuery = "g.V[[name:\"#{bandName}\"]]"
membersQuery += '.out("member").in("member").uniqueObject.name'
-
getCouchDoc bandNodePath, res, (couchObj) ->
gremlin membersQuery, (graphData) ->
artists = couchObj and couchObj['artists']
values = { artists, band: bandName, bands: graphData }
-
- body = """
+ body = """
<h2>{{band}} Band Members</h2>
<ul>{{#artists}}
<li><a href="/artist?name={{name}}">{{name}}</a></li>
@@ -76,14 +74,12 @@ appServer.addRoute "^/band$", (req, res) ->
<li><a href="/band?name={{.}}">{{.}}</a></li>
{{/bands}}</ul>
"""
-
writeTemplate res, body, values
appServer.addRoute "^/artist$", (req, res) ->
artistName = req.param('name')
rolesQuery = "g.V[[name:\"#{artistName}\"]].out('plays').role.uniqueObject"
bandsQuery = "g.V[[name:\"#{artistName}\"]].in('member').name.uniqueObject"
-
gremlin rolesQuery, (roles) ->
gremlin bandsQuery, (bands) ->
values = { roles, bands, artist: artistName }

0 comments on commit 7e3b2e9

Please sign in to comment.
Something went wrong with that request. Please try again.