holidayextras / jsonapi-client

Easily consume a json:api service in Javascript.
MIT License
68 stars 19 forks source link

Sync Resource #68

Open sszenchenko opened 6 years ago

sszenchenko commented 6 years ago

Hi guys,

I'm trying to update the resource using the below code:

`const JsonapiClient = require("@holidayextras/jsonapi-client"); const client = new JsonapiClient("http://localhost:16006");

client.get('plans', 'test_plan', {}, function (err, plan) { if (err) return console.error(err);

plan.set('name', 'Test plan 2'); plan.sync(); });`

But the update handler is not invoked on my server. Other handlers (create, delete, find, etc.) work as expected.

paparomeo commented 6 years ago

Sorry for the late reply @sszenchenko. I'll try to reproduce this soon and will come back to you.