Skip to content

Commit 7fa8ab6

Browse files
committed
Use angularjs promise functions for auto commiting transactions
1 parent f75be3e commit 7fa8ab6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/scripts/services/CypherTransactionREST.coffee

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,11 @@ angular.module('neo4jApp.services')
138138
path: "/commit"
139139
statements: statements
140140
)
141-
p.then((r) ->
141+
p.success((r) ->
142142
r.responseTime = timer.stop().time()
143-
return r
144-
).catch((r) -> r.responseTime = timer.stop().time())
143+
).error((r) ->
144+
r.responseTime = timer.stop().time()
145+
)
145146
res = promiseResult p
146147
res.then(
147148
-> UDC.increment('cypher_wins')

0 commit comments

Comments
 (0)