Skip to content

REST POST data is missing in 1.0.0-pre.5 #84

@marshallswain

Description

@marshallswain

I installed a fresh version of 1.0.0-pre.5 from npm. I set up this simple app (code posted below), but POST'ing data results in the data argument being undefined. I haven't taken any time to find out the cause of the issue, but it's definitely not occurring in version 0.3.0. Do you see anything I'm doing wrong?

var feathers = require('feathers');

var app = feathers();

app.use(feathers.static(__dirname + '/public'));

var todoService = {
  setup:function(app){
    this.todos = [];
  },

  // Return all todos from this service
  find: function(params, callback) {
    callback(null, this.todos);
  },

  // data here is undefined
  create: function(data, params, callback) {
    console.log(arguments);
    // data.id = this.todos.length;
    // this.todos.push(data);

    callback(null, data);
  }
};

app.configure(feathers.rest())
    // .configure(feathers.socketio())
    .use('/todos', todoService)
    .listen(80);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions