Skip to content

Commit eaa3e46

Browse files
committed
Link Fixes
1 parent a0cae85 commit eaa3e46

File tree

16 files changed

+44
-48
lines changed

16 files changed

+44
-48
lines changed

cookies.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

frontend/static/js/apps.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ const appsModule = {
223223
appPanel.innerHTML = '<div class="loading-panel"><i class="fas fa-spinner fa-spin"></i> Loading settings...</div>';
224224

225225
// Fetch settings for this app
226-
HuntarrUtils.fetchWithTimeout(`/api/settings/${app}`)
226+
HuntarrUtils.fetchWithTimeout(`./api/settings/${app}`)
227227
.then(response => {
228228
if (!response.ok) {
229229
throw new Error(`HTTP error! status: ${response.status}`);
@@ -646,7 +646,7 @@ const appsModule = {
646646
console.log('Apprise URLs being sent:', settings.apprise_urls);
647647
}
648648

649-
HuntarrUtils.fetchWithTimeout(`/api/settings/${appType}`, {
649+
HuntarrUtils.fetchWithTimeout(`./api/settings/${appType}`, {
650650
method: 'POST',
651651
headers: {
652652
'Content-Type': 'application/json'

frontend/static/js/apps/eros.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function setupErosForm() {
6363
}
6464

6565
// Call API to test connection
66-
HuntarrUtils.fetchWithTimeout('/api/eros/test-connection', {
66+
HuntarrUtils.fetchWithTimeout('./api/eros/test-connection', {
6767
method: 'POST',
6868
headers: {
6969
'Content-Type': 'application/json'
@@ -148,7 +148,7 @@ function getErosVersion() {
148148
}
149149

150150
// Endpoint to get version info - using the test endpoint since it returns version
151-
HuntarrUtils.fetchWithTimeout('/api/eros/test-connection', {
151+
HuntarrUtils.fetchWithTimeout('./api/eros/test-connection', {
152152
method: 'POST',
153153
headers: {
154154
'Content-Type': 'application/json'
@@ -178,7 +178,7 @@ function getErosVersion() {
178178
*/
179179
function refreshErosStatusAndVersion() {
180180
// Try to get current connection status from the server
181-
HuntarrUtils.fetchWithTimeout('/api/eros/status')
181+
HuntarrUtils.fetchWithTimeout('./api/eros/status')
182182
.then(response => response.json())
183183
.then(data => {
184184
const panel = document.getElementById('erosSettings');

frontend/static/js/apps/whisparr.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function setupWhisparrForm() {
6363
}
6464

6565
// Direct connection test - let the backend handle version checking
66-
HuntarrUtils.fetchWithTimeout('/api/whisparr/test-connection', {
66+
HuntarrUtils.fetchWithTimeout('./api/whisparr/test-connection', {
6767
method: 'POST',
6868
headers: {
6969
'Content-Type': 'application/json'
@@ -144,7 +144,7 @@ function setupWhisparrForm() {
144144

145145
const wasSettingsChanged = typeof huntarrUI !== 'undefined' ? huntarrUI.settingsChanged : false;
146146

147-
HuntarrUtils.fetchWithTimeout('/api/whisparr/get-versions')
147+
HuntarrUtils.fetchWithTimeout('./api/whisparr/get-versions')
148148
.then(response => {
149149
if (!response.ok) {
150150
throw new Error('Failed to fetch Whisparr version');

frontend/static/js/community-resources.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function initCommunityResourcesVisibility() {
2727
}
2828

2929
// Fetch general settings to determine visibility
30-
HuntarrUtils.fetchWithTimeout('/api/settings/general')
30+
HuntarrUtils.fetchWithTimeout('./api/settings/general')
3131
.then(response => {
3232
if (!response.ok) {
3333
throw new Error(`HTTP error! Status: ${response.status}`);

frontend/static/js/direct-reset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ window.lastStatefulHoursValue = null;
5353
window.justCompletedStatefulReset = true;
5454

5555
// Make direct API call
56-
HuntarrUtils.fetchWithTimeout('/api/stateful/reset', {
56+
HuntarrUtils.fetchWithTimeout('./api/stateful/reset', {
5757
method: 'POST',
5858
headers: {
5959
'Content-Type': 'application/json'

frontend/static/js/history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ const historyModule = {
204204
clearHistory: function() {
205205
this.setLoading(true);
206206

207-
HuntarrUtils.fetchWithTimeout(`/api/history/${this.currentApp}`, {
207+
HuntarrUtils.fetchWithTimeout(`./api/history/${this.currentApp}`, {
208208
method: 'DELETE',
209209
})
210210
.then(response => {

frontend/static/js/hourly-cap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ document.addEventListener('DOMContentLoaded', function() {
1515
* Load hourly API cap data from the server
1616
*/
1717
function loadHourlyCapData() {
18-
HuntarrUtils.fetchWithTimeout('/api/hourly-caps')
18+
HuntarrUtils.fetchWithTimeout('./api/hourly-caps')
1919
.then(response => {
2020
if (!response.ok) {
2121
throw new Error('Network response was not ok');

frontend/static/js/logs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ window.LogsModule = {
3030
// Set immediate fallback to prevent warnings during loading
3131
this.userTimezone = this.userTimezone || 'UTC';
3232

33-
fetch('/api/settings')
33+
fetch('./api/settings')
3434
.then(response => response.json())
3535
.then(settings => {
3636
this.userTimezone = settings.general?.timezone || 'UTC';

frontend/static/js/new-main.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)