Skip to content

Commit

Permalink
chore(comments): resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
William Reticena committed Jan 27, 2024
1 parent 87b51d1 commit 3a1a5a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/herbarios-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ export const editar = (request, response, next) => {
};

if (herbario.endereco_id === null) {
const endereço = await Endereco.create(endereco, { transaction });
const localizacao = await Endereco.create(endereco, { transaction });

const dados = {
...request.body.herbario,
endereco_id: endereço.id,
endereco_id: localizacao.id,
};

return herbario.update(dados, { transaction });
Expand Down

0 comments on commit 3a1a5a8

Please sign in to comment.