Changed PUT requests to POST

HTTP spec disallows multipart/form-data requests using PUT method.
This commit is contained in:
Marcin Kurczewski 2014-11-22 14:30:29 +01:00
parent 58d3129548
commit d8d65ed24c
4 changed files with 4 additions and 4 deletions

View file

@ -131,7 +131,7 @@ App.Presenters.PostEditPresenter = function(
return; return;
} }
promise.wait(api.put('/posts/' + post.id, formData)) promise.wait(api.post('/posts/' + post.id, formData))
.then(function(response) { .then(function(response) {
tagList.refreshTags(); tagList.refreshTags();
if (typeof(updateCallback) !== 'undefined') { if (typeof(updateCallback) !== 'undefined') {

View file

@ -123,7 +123,7 @@ App.Presenters.UserAccountSettingsPresenter = function(
delete formData.passwordConfirmation; delete formData.passwordConfirmation;
} }
promise.wait(api.put('/users/' + user.name, formData)) promise.wait(api.post('/users/' + user.name, formData))
.then(function(response) { .then(function(response) {
editSuccess(response); editSuccess(response);
}).fail(function(response) { }).fail(function(response) {

View file

@ -28,7 +28,7 @@ class UpdatePost extends AbstractPostRoute
public function getMethods() public function getMethods()
{ {
return ['PUT']; return ['POST'];
} }
public function getUrl() public function getUrl()

View file

@ -28,7 +28,7 @@ class UpdateUser extends AbstractUserRoute
public function getMethods() public function getMethods()
{ {
return ['PUT']; return ['POST'];
} }
public function getUrl() public function getUrl()