feathersjs-ecosystem / feathers-sync

Synchronize service events between Feathers application instances
MIT License
221 stars 41 forks source link

custom adapters app.sync.serialize is not a function #137

Closed dottodot closed 4 years ago

dottodot commented 4 years ago

I have a custom adapter as documented here https://github.com/feathersjs-ecosystem/feathers-sync#writing-custom-adapters but since version 1.2.0 it causes the following error.

{ TypeError: app.sync.serialize is not a function
    at Object.emit (/node_modules/feathers-sync/lib/core.js:47:46)
    at results.forEach.element (/node_modules/@feathersjs/feathers/lib/events.js:16:42)
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/node_modules/@feathersjs/feathers/lib/events.js:16:15)
    at promise.then.hookObject (/node_modules/@feathersjs/commons/lib/hooks.js:142:73)
dottodot commented 4 years ago

I guess I have to do the same as in the test i.e

 app.sync = {
    serialize: data => data,
    deserialize: data => data
  };

so may just need the docs updating.

deskoh commented 4 years ago

This is due to PR #130. Created PR #138 to update docs.