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;
|
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') {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ class UpdatePost extends AbstractPostRoute
|
||||||
|
|
||||||
public function getMethods()
|
public function getMethods()
|
||||||
{
|
{
|
||||||
return ['PUT'];
|
return ['POST'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUrl()
|
public function getUrl()
|
||||||
|
|
|
@ -28,7 +28,7 @@ class UpdateUser extends AbstractUserRoute
|
||||||
|
|
||||||
public function getMethods()
|
public function getMethods()
|
||||||
{
|
{
|
||||||
return ['PUT'];
|
return ['POST'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUrl()
|
public function getUrl()
|
||||||
|
|
Loading…
Reference in a new issue