C9Glax / tranga-website

Web-Frontend for Tranga-API
GNU General Public License v3.0
17 stars 10 forks source link

fix: initial manga loading #85

Open YodaDaCoda opened 4 months ago

YodaDaCoda commented 4 months ago

also prettier'd the js files to make it easier to read what was going on

db-2001 commented 4 months ago

I'm not sure why the change from const to function is important as it is working as is. When I put in the API URI:PORT the website works fine but trying to put FRONYEND URI/api breaks it. I'll try pulling the absolute latest on my setup and seeing if the issue persists but I'm not sure these changes would have any effect. I do appreciate you cleaning up the JavaScript, though.

YodaDaCoda commented 4 months ago

I'm not sure why the change from const to function is important

the javascript is executed as it is parsed down the file. the call to setup() happens before the const stringToColour was in scope. functions are 'hoisted' so they're always in scope.

When I put in the API URI:PORT the website works fine but trying to put FRONYEND URI/api breaks it

you mean in the Settings panel of the site? image

are you sure it's nginx that's not passing the request along? i'm running cuttingedge for both

db-2001 commented 4 months ago

I restarted the container and it started working fine, I'll make your change from const() to function() in the V2 branch, they're too different to merge easily at this point.