Prisma and mySQL 'POST' method 401 Unauthorized
I have Prisma synced with mysql database (mariaDB).
I have a "dashboard" that I can access with auth through discord.
There I have a form that does POST (and prisma.[whatever].create()) method on submit, but I am getting a 401 error Unauthorized.
Just for reference, fetching data with GET and doing prisma.[whatever].findMany(); works normally
I also can access and see tables through localhost:3000/api/[whatever]
I am assuming that there is no session data available on request since I am getting this in terminal when I try to submit:
But I dont understand how is there no session when I use getSession...
this is the server file in pages
Please, for the love of god, does anyone know where the problem is? I am going crazy by not finiding ways out of this.
Thank you
I have a "dashboard" that I can access with auth through discord.
There I have a form that does POST (and prisma.[whatever].create()) method on submit, but I am getting a 401 error Unauthorized.
Just for reference, fetching data with GET and doing prisma.[whatever].findMany(); works normally
I also can access and see tables through localhost:3000/api/[whatever]
I am assuming that there is no session data available on request since I am getting this in terminal when I try to submit:
But I dont understand how is there no session when I use getSession...
this is the server file in pages
Please, for the love of god, does anyone know where the problem is? I am going crazy by not finiding ways out of this.
Thank you
