Skip to content

Commit

Permalink
Revert "revert: Revert to proxy method for fdroid fetching"
Browse files Browse the repository at this point in the history
This reverts commit ac0b5e6.
  • Loading branch information
marchingon12 committed May 23, 2024
1 parent 84a7073 commit e8d0923
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ export function FdroidFetch() {
const [myneApkFdroidUrl, setMyneApkFdroidUrl] = useState('');
const [greenStashApkFdroidUrl, setGreenStashApkFdroidUrl] = useState('');


useEffect(() => {
const fetchApkUrl = (packageName) => {
return axios.get(`/fdroid/packages/${packageName}`).then((response) => {
const baseURL = import.meta.env.MODE === 'production' ? 'https://f-droid.org/api/v1' : '/fdroid';
return axios.get(`${baseURL}/packages/${packageName}`).then((response) => {
console.log('Response data:', response.data);
const latestPackage = response.data;
if (!latestPackage) {
Expand Down

0 comments on commit e8d0923

Please sign in to comment.