Merge pull request #34 from rede5/codex/fix-405-method-not-allowed-error
Use PATCH for company update to match API route
This commit is contained in:
commit
6517839c9b
1 changed files with 1 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ const GestaoEmpresas = () => {
|
||||||
console.log('📤 Dados para atualização:', payload);
|
console.log('📤 Dados para atualização:', payload);
|
||||||
|
|
||||||
const response = await fetch(`/api/empresas/${editingEmpresa.$id}`, {
|
const response = await fetch(`/api/empresas/${editingEmpresa.$id}`, {
|
||||||
method: 'PUT',
|
method: 'PATCH',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify(payload)
|
body: JSON.stringify(payload)
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue