Edik
$fetch inside API
Ok, problem solved.
I am using lucia auth, and it passed the cookies to the server which was validating it in server middleware. The second $fetch didnt pass thr cookies, so it didnt work. Instead you need to use event.$fetch
Alexander Lichter released a video a few days ago about this topic:
https://youtu.be/7vfwYaHtv3U
3 replies