API is not working properly

Site doesn’t work as it should, but works from local computer when using API.

Any thoughts? It has happened to me before with another site I made

2 errors occur in the browser console.
“catch” in getData() should look like this:

  catch(error) {

Please reply here when this one is fixed.

You also have to use https for the API URL.