score:1

Accepted answer

first i think you inserted the wrong url since you have a bracket at the end of it:

const response = await fetch(`http://localhost:5000/record/gopa}`);
//instead of
const response = await fetch(`http://localhost:5000/record/gopa`);

i saw that you are awaiting twice your object:

  • the first after the fetch:
const response = await fetch(`http://localhost:5000/record/gopa}`);
  • the second (that seems unnecessary):
const dbdata = await response.json();
// how it should be:
const dbdata = response.json();

can you please log us the content of the response, to understand if this is the issue or if the problem comes from another part of your code? i will edit the post if that's the case


Related Query

More Query from same tag