cropsychooo
TTCTheo's Typesafe Cult
•Created by cropsychooo on 8/13/2023 in #questions
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
9 replies
TTCTheo's Typesafe Cult
•Created by cropsychooo on 11/27/2022 in #questions
file.json.gz - SyntaxError unexpected end of data at line 1 column 1 of the JSON data
Hi guys, first I want to apologize if this question is extremely stupid but I have no clue how would I even begin to solve this issue.
Anyway, I am fetching a file export from The Movie DB. http://files.tmdb.org/p/exports/movie_ids_11_22_2022.json.gz
If you open this file you will see that its a json with objects that are not seperated with commas, therefor I can not "extract" stuff out of them.
I am doing all of this in React with package called Pako which essentially handles the zip, right.
code:
Do you have any idea how to seperate all of those objects with commas so I can read stuff out of them?
Its my first question here so if there is a code formatter sorry for not figuring out where it is 😄
And thanks!!
36 replies