Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events don't get sent with the final result #248

Closed
daffl opened this issue Feb 29, 2016 · 2 comments
Closed

Events don't get sent with the final result #248

daffl opened this issue Feb 29, 2016 · 2 comments

Comments

@daffl
Copy link
Member

daffl commented Feb 29, 2016

Something like the following currently does not work. The event only receives { test: 'data' }:

const app = feathers();

app.mixins.push(service => service.mixin({
  create(... args) {
    return this._super(... args).then(data => {
      data.modified = true;
      return data;
    });
  }
}));

app.use('/todos', {
  create(data) {
    return Promise.resolve(data);
  }
});

const service = app.service('todos');

service.on('created', data => {
  try {
    assert.deepEqual(data, { test: 'data', modified: true });
    done();
  } catch(e) {
    done(e);
  }
});

service.create({ test: 'data' });
@daffl daffl changed the title Events don't get send with the final result Events don't get sent with the final result Feb 29, 2016
@daffl daffl added this to the 3.0.0 milestone Mar 2, 2016
@ekryski
Copy link
Contributor

ekryski commented Mar 6, 2016

Feathers-hooks v1.4.0 has a fix for this and it landed through feathersjs-ecosystem/feathers-hooks#57.

@ekryski ekryski closed this as completed Mar 6, 2016
@daffl daffl removed this from the 3.0.0 milestone Apr 13, 2016
@lock
Copy link

lock bot commented Feb 7, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants