dimanche 3 avril 2016

Ember.js model save sends no data to server

I'm currently building a small demo app using Ember.JS and NodeJS with Express. I've knocked up a simple model and have created an action to save it.

The component has a property called recipe, which is an instance of a model I've defined. The save action is as simple as:

save() {
  this.get('recipe').save();
}

Looking at my network tab in Chrome dev tools, I can see the data in the request payload. However, I can't access the data in my Node app. I've logged the full req object and my data isn't there anywhere.

I have a feeling this is to do with the fact that Ember uses the PATCH verb, whereas I'd expect it to use PUT or POST.

Any help is greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire