adrianhajdin/project_ai_mern_image_generation

SyntaxError: Unexpected token 'B', "Billing ha"... is not valid JSON

iamutkarshyadav opened this issue · 3 comments

Hey @iamutkarshyadav I think I might have the solution for that!

in your CreatePost.jsx file under the generateImage function. Change your fetch response to => const response = await fetch('http://localhost:8080/api/v1/dalle', {
Hope that helps.

And if that works, I suggest you do the same thing for all the other ones (even in your Home.jsx). Such as for the fetch response: https://dalle-arbb.onrender.com/api/v1/post, change it to => http://localhost:8080/api/v1/post

thanks, it worked!