Giter Site home page Giter Site logo

Comments (4)

RyanRamos01 avatar RyanRamos01 commented on September 15, 2024 1

O problema não está no cadastro, criei um tombo por api usando o seguinte json:

{
"json": {
"principal": {
"nome_popular": "nome popular 10",
"entidade_id": 2,
"numero_coleta": 140213,
"data_coleta": {
"dia": 1,
"mes": 1,
"ano": 2024
},
"tipo_id": "2",
"cor": "VERMELHO"
},
"taxonomia": {
"familia_id": "8",
"genero_id": "247",
"especie_id": "3008"
},
"localidade": {
"latitude": "5°0'0,00"N",
"longitude": "12°12'12,00"W",
"altitude": 100,
"cidade_id": 4104303,
"complemento": "asd"
},
"paisagem": {
"solo_id": "10",
"descricao": "asd",
"relevo_id": "5",
"vegetacao_id": "22",
"fase_sucessional_id": "1"
},
"coletores": [
3071
]
}
}

E os campos "solo_id": "10", "relevo_id": "5", "vegetacao_id": "22", são inseridos normalmente, vou verificar a listagem.

Image

from hcf-api.

RyanRamos01 avatar RyanRamos01 commented on September 15, 2024

Dando get no tombo criado, temos em local_coleta, o solo, relevo e vegetação inseridos, o problema pode estar no frontend?

Image

from hcf-api.

edvaldoszy avatar edvaldoszy commented on September 15, 2024

Acabei de testar no front e está funcionando normalmente. Ontem eu aprovei um PR da Elaine, isso pode ter corrigido o problema. Vamos considerar o ticket como resolvido.

Abaixo está a requisição que o front-end fez.

curl 'https://api.hcf.cm.utfpr.edu.br/tombos' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en,pt-BR;q=0.9,pt;q=0.8,en-US;q=0.7' \
  -H 'content-type: application/json' \
  -H 'origin: https://hcf.cm.utfpr.edu.br' \
  -H 'priority: u=1, i' \
  -H 'referer: https://hcf.cm.utfpr.edu.br/' \
  -H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwibm9tZSI6IkN1cmFkb3IiLCJlbWFpbCI6ImVkdmFsZG9zenlAZ21haWwuY29tIiwidGlwb191c3VhcmlvX2lkIjoxLCJpYXQiOjE3MTY0MDY1ODAsImV4cCI6MTcxNjU3OTM4MH0.xdwG8vBl0JXBqghK85lqyfwQIPwELWfsoPD1LCAhwjY' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' \
  --data-raw $'{"json":{"principal":{"nome_popular":"Nome popular 4","entidade_id":2,"numero_coleta":140214,"data_coleta":{"dia":1,"mes":1,"ano":2024},"tipo_id":"3","cor":"VERMELHO"},"taxonomia":{"familia_id":"8","genero_id":"248"},"localidade":{"latitude":"48°56\'15,00\\"N","longitude":"48°56\'16,00\\"W","altitude":100,"cidade_id":4104303},"paisagem":{"solo_id":"10","relevo_id":"6","vegetacao_id":"20"},"identificacao":{"identificadores":["1"],"data_identificacao":{"dia":1,"mes":1,"ano":2024}},"coletores":[3071]}}'

from hcf-api.

RyanRamos01 avatar RyanRamos01 commented on September 15, 2024

Perfeito!

from hcf-api.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.