Skip to content

Commit 20f3be0

Browse files
committed
fix a bug
1 parent 5863843 commit 20f3be0

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,31 @@ Changes on a graph are not committed until the put_graph method is called.
110110

111111
### Use from Console:
112112

113+
$ curl http://localhost:4567/
114+
{
115+
"version": "0.1.0",
116+
"supportedPaths": {
117+
"GET": [
118+
"/graphs",
119+
"/graphs/[graph]",
120+
"/graphs/[graph]/vertices",
121+
"/graphs/[graph]/vertices?key=[key]&value=[value]",
122+
"/graphs/[graph]/vertices/[vertex]",
123+
"/graphs/[graph]/vertices/[vertex]/out",
124+
...
125+
],
126+
"POST": [
127+
...
128+
],
129+
"PUT": [
130+
...
131+
],
132+
"DELETE": [
133+
...
134+
]
135+
}
136+
}
137+
113138
$ curl http://localhost:4567/graphs
114139
{
115140
"version": "0.1.0",
@@ -118,6 +143,7 @@ Changes on a graph are not committed until the put_graph method is called.
118143
"tinkergraph"
119144
]
120145
}
146+
121147
$ curl http://localhost:4567/graphs/tinkergraph/vertices/1
122148
{
123149
"version": "0.1.0",

lib/red_grape.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RedGrape
2-
VERSION = '0.1.0'
2+
VERSION = '0.1.1'
33
end
44

55
require 'ext/nil_class_ext'

public/cellar/graph.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
params[kv[0]] = kv[1];
149149
}
150150
$.post(
151-
'/graphs/' + 'tinkergraph' + '/vertices/' + id,
151+
'/graphs/' + graphId + '/vertices/' + id,
152152
params,
153153
function(data) {
154154
window.location.reload(); // TODO
@@ -175,7 +175,7 @@
175175
params[kv[0]] = kv[1];
176176
}
177177
$.post(
178-
'/graphs/' + 'tinkergraph' + '/edges/' + id,
178+
'/graphs/' + graphId + '/edges/' + id,
179179
params,
180180
function(data) {
181181
window.location.reload(); // TODO

0 commit comments

Comments
 (0)