Skip to content

Commit f17b70c

Browse files
committed
working version
1 parent b8433b6 commit f17b70c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
usage: HTTP GET http://localhost:8080/hack17/SOME_ARTICLE_NAME
1+
usage: HTTP GET http://localhost:8080/graph/SOME_ARTICLE_NAME
22

33
response: {
44
"data": [

runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_db():
1010
def get_graph(article):
1111
db = get_db()
1212
# query = 'MATCH (p:Page {title:{0}})<-[:Link]-(o:Page) RETURN o.title as link_title LIMIT {1}'.format(article, 100)
13-
query = 'MATCH (p:Page {title:"Ireland"})<-[:Link]-(o:Page) RETURN o.title as link'
13+
query = 'MATCH (p:Page {title:"%s"})<-[:Link]-(o:Page) RETURN o.title as link' % article.replace("_"," ")
1414
results = db.run(query)
1515
nodes = []
1616
rels = []

0 commit comments

Comments
 (0)