Changed PUT requests to POST
HTTP spec disallows multipart/form-data requests using PUT method.
This commit is contained in:
parent
58d3129548
commit
d8d65ed24c
4 changed files with 4 additions and 4 deletions
|
@ -131,7 +131,7 @@ App.Presenters.PostEditPresenter = function(
|
|||
return;
|
||||
}
|
||||
|
||||
promise.wait(api.put('/posts/' + post.id, formData))
|
||||
promise.wait(api.post('/posts/' + post.id, formData))
|
||||
.then(function(response) {
|
||||
tagList.refreshTags();
|
||||
if (typeof(updateCallback) !== 'undefined') {
|
||||
|
|
|
@ -123,7 +123,7 @@ App.Presenters.UserAccountSettingsPresenter = function(
|
|||
delete formData.passwordConfirmation;
|
||||
}
|
||||
|
||||
promise.wait(api.put('/users/' + user.name, formData))
|
||||
promise.wait(api.post('/users/' + user.name, formData))
|
||||
.then(function(response) {
|
||||
editSuccess(response);
|
||||
}).fail(function(response) {
|
||||
|
|
|
@ -28,7 +28,7 @@ class UpdatePost extends AbstractPostRoute
|
|||
|
||||
public function getMethods()
|
||||
{
|
||||
return ['PUT'];
|
||||
return ['POST'];
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
|
|
|
@ -28,7 +28,7 @@ class UpdateUser extends AbstractUserRoute
|
|||
|
||||
public function getMethods()
|
||||
{
|
||||
return ['PUT'];
|
||||
return ['POST'];
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
|
|
Loading…
Reference in a new issue