Open busuyiomotosho opened 1 year ago
I have to say I don't have much experience and you may have already tried this solution but have you checked if your credentials and API keys are correct? Also, make sure the keys and secret are not quoted. Check the .env file.
GithubProvider({ clientId: process.env.GITHUB_ID, clientSecret: process.env.GITHUB_SECRET, }), GoogleProvider({ clientId: process.env.GOOGLE_CLIENT_ID, clientSecret: process.env.GOOGLE_CLIENT_SECRET, }), ], pages: { error: "/dashboard/login", },
I'm having an issue with
handleSubmit
function in the dashboard.jsx, specifically fetching data from/api/posts
. When I try submitting a new blog post, I keep getting error 500 (internal server error) coming from theawait fetch("/api/posts", {...})
line. I even downloaded a local zip copy of your finished project and ran it on my computer but got the same error. What could be the issue and how do I fix it?Looking forward to your response, thank you!
the issue is because of our Post model have conflict with the POST api name so go to Post model and change it's name to Posts and change it in the API file too
that worked for me
I'm having an issue with
handleSubmit
function in the dashboard.jsx, specifically fetching data from/api/posts
. When I try submitting a new blog post, I keep getting error 500 (internal server error) coming from theawait fetch("/api/posts", {...})
line. I even downloaded a local zip copy of your finished project and ran it on my computer but got the same error. What could be the issue and how do I fix it?Looking forward to your response, thank you!