diff options
| author | Alejandro Soto <alejandro@34project.org> | 2026-01-31 13:07:59 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2026-01-31 13:09:34 -0600 |
| commit | 0f6a8aa22d9b554c211a9d77bbf4fefdcabc20d1 (patch) | |
| tree | 451cb64cb04e16c0554aed19b86feacd7b01ce2c /pkgs/socialpredict/0002-Fix-API_URL-api-v0-.-API_URL-v0.patch | |
| parent | 57c2ec0f3a2672cf0965c1fe70f4a4f08bab2718 (diff) | |
trivionomicon: socialpredict: patch ${API_URL}/api/v0/... -> ${API_URL}/v0/...
Diffstat (limited to 'pkgs/socialpredict/0002-Fix-API_URL-api-v0-.-API_URL-v0.patch')
| -rw-r--r-- | pkgs/socialpredict/0002-Fix-API_URL-api-v0-.-API_URL-v0.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/socialpredict/0002-Fix-API_URL-api-v0-.-API_URL-v0.patch b/pkgs/socialpredict/0002-Fix-API_URL-api-v0-.-API_URL-v0.patch new file mode 100644 index 0000000..09b0d70 --- /dev/null +++ b/pkgs/socialpredict/0002-Fix-API_URL-api-v0-.-API_URL-v0.patch @@ -0,0 +1,47 @@ +From 9ce9d4d3bdbd12dfb3dda98f3d4f72d3bbe724b7 Mon Sep 17 00:00:00 2001 +From: Alejandro Soto <alejandro@34project.org> +Date: Sat, 31 Jan 2026 13:04:28 -0600 +Subject: [PATCH 2/2] Fix ${API_URL}/api/v0/... -> ${API_URL}/v0/... + +--- + src/hooks/usePortfolio.jsx | 2 +- + src/hooks/useUserData.jsx | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/hooks/usePortfolio.jsx b/src/hooks/usePortfolio.jsx +index 0f0774b..a233ea3 100644 +--- a/src/hooks/usePortfolio.jsx ++++ b/src/hooks/usePortfolio.jsx +@@ -17,7 +17,7 @@ const usePortfolio = (username) => { + headers['Content-Type'] = 'application/json'; + } + +- const response = await fetch(`${API_URL}/api/v0/portfolio/${username}`, { headers }); ++ const response = await fetch(`${API_URL}/v0/portfolio/${username}`, { headers }); + if (!response.ok) { + throw new Error('Failed to fetch portfolio'); + } +diff --git a/src/hooks/useUserData.jsx b/src/hooks/useUserData.jsx +index 593594f..960c5aa 100644 +--- a/src/hooks/useUserData.jsx ++++ b/src/hooks/useUserData.jsx +@@ -15,14 +15,14 @@ const useUserData = (username, usePrivateProfile = false) => { + + if (usePrivateProfile) { + // Use private profile endpoint for authenticated user's own profile +- url = `${API_URL}/api/v0/privateprofile`; ++ url = `${API_URL}/v0/privateprofile`; + headers = { + 'Authorization': `Bearer ${token}`, + 'Content-Type': 'application/json' + }; + } else { + // Use public user endpoint for viewing other users' profiles +- url = `${API_URL}/api/v0/userinfo/${username}`; ++ url = `${API_URL}/v0/userinfo/${username}`; + if (token) { + headers = { + 'Authorization': `Bearer ${token}`, +-- +2.51.2 + |
