I have a properly configured Backbone Model, but when I run the save method like so:
backbone_model.save(null, {
success: function () { console.log('ok'); },
error : function () { console.log('not ok'); }
});
I have a successful POST request sent (and Backbone request is triggered) to my Node instance which responds with nothing except 200 OK like so:
app.post('/backbone', function (req, res) {
res.send(); // Automatically sends 200 OK
}
But Backbone does not trigger the sync event, and the error callback is executed. I've also tried returning 201 Created, with no success.
Aucun commentaire:
Enregistrer un commentaire