Stop mixing API parameters and user data.
Modify jIO API to keep user data not modified. jIO.get({"_id": "foo"} -> jIO.get("foo") jIO.remove({"_id": "foo"} -> jIO.remove("foo") jIO.post({"title": "bar"}) -> jIO.post({"title": "bar"}) jIO.put({"_id": "foo", "title": "bar"}) -> jIO.put("foo", {"title": "bar"}) jIO.getAttachment({"_id": "foo", "_attachment": "enclosure"} -> jIO.get("foo", "enclosure") jIO.removeAttachment({"_id": "foo", "_attachment": "enclosure"} -> jIO.remove("foo", "enclosure") jIO.putAttachment({"_id": "foo", "_attachment": "enclosure", "_blob": blob} -> jIO.remove("foo", "enclosure", blob) jIO.get does not return an _id attribute anymore.
Showing
This diff is collapsed.
Please register or sign in to comment