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 the await 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!