diff --git a/backend/src/poap/index.js b/backend/src/poap/index.js index c8f7306..5b7f8c9 100644 --- a/backend/src/poap/index.js +++ b/backend/src/poap/index.js @@ -3,12 +3,13 @@ import axios from 'axios'; class POAP { static async fetchEvents() { - const response = await axios.get('https://api.poap.xyz/events'); + const response = await axios.get('https://api-event.poap.xyz'); + return response.data; } static async fetchTokens(account) { - const response = await axios.get(`https://api.poap.xyz/actions/scan/${account}`); + const response = await axios.get(`https://api.poap.tech/actions/scan/${account}`); return response.data; } } diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 279d661..cb2db80 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -31,7 +31,7 @@ export default { // Get user's POAP tokens if (userAddress && JSON.parse(userAddress)) { - const poapTokensUrl = `https://api.poap.xyz/actions/scan/${JSON.parse(userAddress)}`; + const poapTokensUrl = `https://api.poap.tech/actions/scan/${JSON.parse(userAddress)}`; tokens = await jsonFetch(poapTokensUrl); } this.$store.commit('user/setTokens', tokens); diff --git a/frontend/src/store/poap/actions.js b/frontend/src/store/poap/actions.js index 1431dac..8517533 100644 --- a/frontend/src/store/poap/actions.js +++ b/frontend/src/store/poap/actions.js @@ -6,7 +6,8 @@ const jsonFetch = (url) => fetch(url).then((res) => res.json()); * @notice GET list of all POAP events from the POAP API */ export async function getEvents({ commit }) { - const events = await jsonFetch('https://api.poap.xyz/events'); + const events = await jsonFetch('https://api-event.poap.xyz'); + commit('setEvents', events); } diff --git a/frontend/src/store/user/actions.js b/frontend/src/store/user/actions.js index 4cc8360..c901313 100644 --- a/frontend/src/store/user/actions.js +++ b/frontend/src/store/user/actions.js @@ -2,7 +2,7 @@ const jsonFetch = (url) => fetch(url).then((res) => res.json()); export async function setEthereumData({ commit }, wallet) { // Get user's POAP tokens - const poapTokensUrl = `https://api.poap.xyz/actions/scan/${wallet}`; + const poapTokensUrl = `https://api.poap.tech/actions/scan/${wallet}`; const tokens = await jsonFetch(poapTokensUrl); // Commit all state changes simultaneously to avoid UI inconsistencies