@@ -995,7 +995,7 @@ let huntarrUI = {
995995 this . settingsChanged = false ;
996996
997997 // Get all settings to populate forms
998- HuntarrUtils . fetchWithTimeout ( '/api/settings' )
998+ HuntarrUtils . fetchWithTimeout ( '. /api/settings' )
999999 . then ( response => response . json ( ) )
10001000 . then ( data => {
10011001 console . log ( 'Loaded settings:' , data ) ;
@@ -1457,7 +1457,7 @@ let huntarrUI = {
14571457 statusElement . innerHTML = '<span style="color: #fbbf24;">Sending test notification...</span>' ;
14581458
14591459 // Now test with the saved settings
1460- return HuntarrUtils . fetchWithTimeout ( '/api/test-notification' , {
1460+ return HuntarrUtils . fetchWithTimeout ( '. /api/test-notification' , {
14611461 method : 'POST' ,
14621462 headers : {
14631463 'Content-Type' : 'application/json'
@@ -1527,7 +1527,7 @@ let huntarrUI = {
15271527 }
15281528
15291529 // Save the settings
1530- HuntarrUtils . fetchWithTimeout ( '/api/settings/general' , {
1530+ HuntarrUtils . fetchWithTimeout ( '. /api/settings/general' , {
15311531 method : 'POST' ,
15321532 headers : {
15331533 'Content-Type' : 'application/json'
@@ -1673,7 +1673,7 @@ let huntarrUI = {
16731673 url = this . cleanUrlString ( url ) ;
16741674
16751675 // Make the API request to test the connection
1676- HuntarrUtils . fetchWithTimeout ( `/api/${ appName } /test-connection` , {
1676+ HuntarrUtils . fetchWithTimeout ( `. /api/${ appName } /test-connection` , {
16771677 method : 'POST' ,
16781678 headers : {
16791679 'Content-Type' : 'application/json'
@@ -1768,7 +1768,7 @@ let huntarrUI = {
17681768 } ,
17691769
17701770 checkAppConnection : function ( app ) {
1771- HuntarrUtils . fetchWithTimeout ( `/api/status/${ app } ` )
1771+ HuntarrUtils . fetchWithTimeout ( `. /api/status/${ app } ` )
17721772 . then ( response => response . json ( ) )
17731773 . then ( data => {
17741774 // Pass the whole data object for all apps
@@ -1983,7 +1983,7 @@ let huntarrUI = {
19831983
19841984 // User actions
19851985 startHunt : function ( ) {
1986- HuntarrUtils . fetchWithTimeout ( '/api/hunt/start' , { method : 'POST' } )
1986+ HuntarrUtils . fetchWithTimeout ( '. /api/hunt/start' , { method : 'POST' } )
19871987 . then ( response => response . json ( ) )
19881988 . then ( data => {
19891989 if ( data . success ) {
@@ -1999,7 +1999,7 @@ let huntarrUI = {
19991999 } ,
20002000
20012001 stopHunt : function ( ) {
2002- HuntarrUtils . fetchWithTimeout ( '/api/hunt/stop' , { method : 'POST' } )
2002+ HuntarrUtils . fetchWithTimeout ( '. /api/hunt/stop' , { method : 'POST' } )
20032003 . then ( response => response . json ( ) )
20042004 . then ( data => {
20052005 if ( data . success ) {
@@ -2019,7 +2019,7 @@ let huntarrUI = {
20192019 const usernameElement = document . getElementById ( 'username' ) ;
20202020 if ( ! usernameElement ) return ;
20212021
2022- HuntarrUtils . fetchWithTimeout ( '/api/user/info' )
2022+ HuntarrUtils . fetchWithTimeout ( '. /api/user/info' )
20232023 . then ( response => response . json ( ) )
20242024 . then ( data => {
20252025 if ( data . username ) {
@@ -2040,7 +2040,7 @@ let huntarrUI = {
20402040 // Check if local access bypass is enabled and update UI accordingly
20412041 checkLocalAccessBypassStatus : function ( ) {
20422042 console . log ( "Checking local access bypass status..." ) ;
2043- HuntarrUtils . fetchWithTimeout ( '/api/get_local_access_bypass_status' ) // Corrected URL
2043+ HuntarrUtils . fetchWithTimeout ( '. /api/get_local_access_bypass_status' ) // Corrected URL
20442044 . then ( response => {
20452045 if ( ! response . ok ) {
20462046 // Log error if response is not OK (e.g., 404, 500)
@@ -2125,7 +2125,7 @@ let huntarrUI = {
21252125 logout : function ( e ) { // Added logout function
21262126 e . preventDefault ( ) ; // Prevent default link behavior
21272127 console . log ( '[huntarrUI] Logging out...' ) ;
2128- HuntarrUtils . fetchWithTimeout ( '/logout' , { // Use the correct endpoint defined in Flask
2128+ HuntarrUtils . fetchWithTimeout ( '. /logout' , { // Use the correct endpoint defined in Flask
21292129 method : 'POST' ,
21302130 headers : {
21312131 'Content-Type' : 'application/json'
@@ -2163,7 +2163,7 @@ let huntarrUI = {
21632163 statsContainer . classList . add ( 'stats-loading' ) ;
21642164 }
21652165
2166- HuntarrUtils . fetchWithTimeout ( '/api/stats' )
2166+ HuntarrUtils . fetchWithTimeout ( '. /api/stats' )
21672167 . then ( response => {
21682168 if ( ! response . ok ) {
21692169 throw new Error ( 'Network response was not ok' ) ;
@@ -2364,7 +2364,7 @@ let huntarrUI = {
23642364 try {
23652365 const requestBody = appType ? { app_type : appType } : { } ;
23662366
2367- HuntarrUtils . fetchWithTimeout ( '/api/stats/reset_public' , {
2367+ HuntarrUtils . fetchWithTimeout ( '. /api/stats/reset_public' , {
23682368 method : 'POST' ,
23692369 headers : {
23702370 'Content-Type' : 'application/json'
@@ -2428,7 +2428,7 @@ let huntarrUI = {
24282428
24292429 // Load current version from version.txt
24302430 loadCurrentVersion : function ( ) {
2431- HuntarrUtils . fetchWithTimeout ( '/version.txt' )
2431+ HuntarrUtils . fetchWithTimeout ( '. /version.txt' )
24322432 . then ( response => {
24332433 if ( ! response . ok ) {
24342434 throw new Error ( 'Failed to load version.txt' ) ;
@@ -2669,7 +2669,7 @@ let huntarrUI = {
26692669 }
26702670
26712671 // Always fetch fresh data from the server
2672- HuntarrUtils . fetchWithTimeout ( '/api/stateful/info' , {
2672+ HuntarrUtils . fetchWithTimeout ( '. /api/stateful/info' , {
26732673 cache : 'no-cache' ,
26742674 headers : {
26752675 'Cache-Control' : 'no-cache, no-store, must-revalidate' ,
@@ -2881,7 +2881,7 @@ let huntarrUI = {
28812881 // Add debug logging
28822882 console . log ( "Sending reset request to /api/stateful/reset" ) ;
28832883
2884- HuntarrUtils . fetchWithTimeout ( '/api/stateful/reset' , {
2884+ HuntarrUtils . fetchWithTimeout ( '. /api/stateful/reset' , {
28852885 method : 'POST' ,
28862886 headers : {
28872887 'Accept' : 'application/json' ,
@@ -2998,7 +2998,7 @@ let huntarrUI = {
29982998 console . log ( `[huntarrUI] Directly updating stateful expiration to ${ hours } hours` ) ;
29992999
30003000 // Make a direct API call to update the stateful expiration
3001- HuntarrUtils . fetchWithTimeout ( '/api/stateful/update-expiration' , {
3001+ HuntarrUtils . fetchWithTimeout ( '. /api/stateful/update-expiration' , {
30023002 method : 'POST' ,
30033003 headers : {
30043004 'Content-Type' : 'application/json'
@@ -3109,7 +3109,7 @@ let huntarrUI = {
31093109
31103110 // Check if Low Usage Mode is enabled in settings and apply it
31113111 checkLowUsageMode : function ( ) {
3112- return HuntarrUtils . fetchWithTimeout ( '/api/settings/general' , {
3112+ return HuntarrUtils . fetchWithTimeout ( '. /api/settings/general' , {
31133113 method : 'GET'
31143114 } )
31153115 . then ( response => response . json ( ) )
0 commit comments