signalpoint / jDrupal

A JavaScript Library and API for Drupal Applications
http://jdrupal.tylerfrankenstein.com/
GNU General Public License v2.0
76 stars 38 forks source link

Fix patch response check #63

Closed adam-clarey closed 7 years ago

adam-clarey commented 7 years ago

in /src/entity.js

The function jDrupal.Entity.prototype.save expects the response code to be 201 or 204 to be considered 'valid', however when i run a patch to update a node I get the response 200.

Not sure why there is a discrepancy here, maybe core has updated the response codes as I'm using Drupal 8.3

signalpoint commented 7 years ago

Thank you @adam-clarey , it's interesting to see that a 200 is being returned now, thank you for pointing this out and for the pull request.