Skip to content
Snippets Groups Projects
Commit 9fea5adf authored by Lucas Eduardo Schoenfelder's avatar Lucas Eduardo Schoenfelder
Browse files

solved error 500 when sending form data

parent ed922706
No related branches found
No related tags found
4 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!35Fix remaining bugs
...@@ -122,10 +122,7 @@ export const deleteRequest = (url, onSuccess, onError) => { ...@@ -122,10 +122,7 @@ export const deleteRequest = (url, onSuccess, onError) => {
export const putRequest = (url, payload, onSuccess, onError) => { export const putRequest = (url, payload, onSuccess, onError) => {
let newHeaders = fetchHeaders() let newHeaders = fetchHeaders()
if (payload instanceof FormData) { if (!(payload instanceof FormData)) {
newHeaders.append('Content-Type', 'multipart/form-data')
}
else {
newHeaders.append('Content-Type', 'application/json') newHeaders.append('Content-Type', 'application/json')
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment