#Property does not exist on type 'never'

1 messages · Page 1 of 1 (latest)

timid sigil
#

Excuse my ignorance but I've never seen a GET route that returns props. Usually a GET will return a response like examples given in the astro docs:

return new Response(
JSON.stringify(product), {
status: 200,
headers: {
"Content-Type": "application/json"
}
}
);

#

So you could try returning somehting like:

const returnItem = { userId, user, projects }
  return new Response(
    JSON.stringify(returnItem), {
      status: 200,
      headers: {
        "Content-Type": "application/json"
      }
    }
  );