setting content type to JSON for http PATCH
Updating OperationView.coffee to add JSON content type for PATCH similar to POST and PUT so that the newly added PATCH works fine
This commit is contained in:
@@ -78,7 +78,7 @@ class OperationView extends Backbone.View
|
||||
complete: (data) =>
|
||||
@showCompleteStatus(data)
|
||||
|
||||
obj.contentType = "application/json" if (obj.type.toLowerCase() == "post" or obj.type.toLowerCase() == "put")
|
||||
obj.contentType = "application/json" if (obj.type.toLowerCase() == "post" or obj.type.toLowerCase() == "put" or obj.type.toLowerCase() == "patch")
|
||||
|
||||
jQuery.ajax(obj)
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user