bluzi / jsonstore

:rocket: jsonstore offers a free and secured JSON-based cloud datastore for small projects | Inactive
https://www.jsonstore.io/
MIT License
2.03k stars 74 forks source link

Fix #14, pass object to update #16

Closed akshendra closed 6 years ago

akshendra commented 6 years ago

Possible fix for https://github.com/bluzi/jsonstore/issues/14

bluzi commented 6 years ago

How do you know this method works?

akshendra commented 6 years ago

According to the docs here https://firebase.google.com/docs/database/web/read-and-write (Update specific fields seconds.) I have also tried the example given in readme for PUT with my firebase config.

akshendra commented 6 years ago

Thinking about it, now it is basically the same as POST. A solution will be that when an object is passed as body, we only replace the child nodes by constructing the updates properly before sending on firebase. However that goes against the definition of PUT.

bluzi commented 6 years ago

I think it's good as is. Thanks @akshendra!