Hello dear Astro Community,
I just try to figure out the middleware of astro and unfortunately, I run into a problem.
I fetch some data from two api's (currently, more planned) with fetch() which works great if I store it into the component script of my components/Test.astro. However, if I put it into the middleware, it doesn't work. I already tried different ways and changed some of my code, but couldn't solve this issue, so I am asking you for help.
I have attached a .txt showing what has worked for me and what I have tried that unfortunately does not work. Please note that I am aware of some redundancy in my JS code 🙂 As long as it worked, I wanted to keep it that way and clean it up later ^^
I'm sure I've overlooked some important detail and/or made a silly mistake, so I'd be very grateful if someone could enlighten me!