Having Quotes show up in SQLite.db

In this, I was having trouble how to have the quotes function be shown as I didn’t have this code initially, Then after initializing the array into the database, I was having trouble in creating the for and if loops in this as I wasnt able to understand how to new quote variable and have it generate a new one, and not repeat. I had to use the help from my backend developer, Shaurya, to teach me. He ended up teaching me the understanding of how the code functions and what it does.

Cors Error

image

I was having this CORS error for the longest amount of time near the end of my project. As I was getting ready to deploy everything instead of using localhost, this was the common error I was facing, along with my peers. I had to incorporate this line of code which basically sets the origin and headers of the cross origin resource sharing. This issue was resolved by ChatGPT, which took in reality about a few hours. I was getting lost as to where I could make these changes, what changes to make, and how. I first checked my NGINX file in AWS to see if maybe the allowed cross origins is missing there. Then I checked the frontend if I needed to use mode: no-cors and if there was something wrong in my fetch. Yet I was unable to find the issue, until I realized it was in the backend. I knew it was in the API Controller instantly as that determines the functionality.