Commit Graph

1 Commits

Author SHA1 Message Date
Piotr Sarnacki
d4955c1ed0 Fix hooks toggling
New ember-data serializers send data without a model key in the payload
by default, so instead of what API expects:

    {
      "hook": {
        "id": 1,
        "active": true
      }
    }

it would send:

    { "id": 1, "active": true }

Because of that we need to change how hooks are serialized.

Furthermore, API V2 returns just "result: true" after a successful
request to change a hook, so we need to return something meaningful from
the adapter's updateRecord in order to make ember-data happy.
2015-12-08 10:18:08 +01:00