• Romain Courteaud's avatar
    Stop mixing API parameters and user data. · 12bb5c55
    Romain Courteaud authored
    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.
    12bb5c55
erp5storage.tests.js 17.3 KB