Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Junming
jio
Commits
eab60f05
Commit
eab60f05
authored
Mar 10, 2015
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove and put now return the document ID by default
parent
bd7c3188
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
src/jio.js
src/jio.js
+6
-2
test/jio.storage/drivetojiomapping.tests.js
test/jio.storage/drivetojiomapping.tests.js
+2
-2
No files found.
src/jio.js
View file @
eab60f05
...
...
@@ -300,14 +300,18 @@
this
.
__storage
=
storage
;
}
declareMethod
(
JioProxyStorage
,
"
put
"
,
checkId
);
declareMethod
(
JioProxyStorage
,
"
put
"
,
checkId
,
function
(
argument_list
)
{
return
argument_list
[
0
].
_id
;
});
declareMethod
(
JioProxyStorage
,
"
get
"
,
checkId
,
function
(
argument_list
,
result
)
{
// XXX Drop all _ properties
// Put _id properties to the result
result
.
_id
=
argument_list
[
0
].
_id
;
return
result
;
});
declareMethod
(
JioProxyStorage
,
"
remove
"
,
checkId
);
declareMethod
(
JioProxyStorage
,
"
remove
"
,
checkId
,
function
(
argument_list
)
{
return
argument_list
[
0
].
_id
;
});
// listeners
declareMethod
(
JioProxyStorage
,
"
post
"
,
function
(
param
,
storage
,
method_name
)
{
...
...
test/jio.storage/drivetojiomapping.tests.js
View file @
eab60f05
...
...
@@ -471,7 +471,7 @@
jio
.
remove
({
"
_id
"
:
"
bar
"
})
.
then
(
function
(
result
)
{
equal
(
result
,
"
Removed
"
);
equal
(
result
,
"
bar
"
);
equal
(
call_count
,
2
);
})
.
fail
(
function
(
error
)
{
...
...
@@ -516,7 +516,7 @@
jio
.
remove
({
"
_id
"
:
"
bar
"
})
.
then
(
function
(
result
)
{
equal
(
result
,
"
Removed document
"
);
equal
(
result
,
"
bar
"
);
equal
(
call_count
,
2
);
})
.
fail
(
function
(
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment