Commit 0ac93cce authored by mgabdev's avatar mgabdev

Updated news action news, trends urls to be gab origin for prod

• Updated:
- news action news, trends urls to be gab origin for prod
parent 39388468
......@@ -29,9 +29,9 @@ export const fetchGabTrends = () => (dispatch, getState) => {
dispatch(fetchGabTrendsRequest())
// const url = 'https://trends.gab.com/partner'
api(getState).get(`/api/v1/gab_trends?type=partner`).then((response) => {
// axios.get(url).then((response) => {
const url = 'https://trends.gab.com/partner'
// api(getState).get(`/api/v1/gab_trends?type=partner`).then((response) => {
axios.get(url).then((response) => {
dispatch(fetchGabTrendsSuccess(response.data))
}).catch((error) => {
dispatch(fetchGabTrendsFail(error))
......@@ -64,9 +64,9 @@ export const expandGabTrendsFeed = (feedId) => (dispatch, getState) => {
dispatch(expandGabTrendsFeedRequest(feedId))
// const url = `http://trends.gab.com/feed/${feedId}?fmt=json&p=${page}`
api(getState).get(`/api/v1/gab_trends?type=rss&page=${page}&feedId=${feedId}`).then((response) => {
// axios.get(url).then((response) => {
const url = `http://trends.gab.com/feed/${feedId}?fmt=json&p=${page}`
// api(getState).get(`/api/v1/gab_trends?type=rss&page=${page}&feedId=${feedId}`).then((response) => {
axios.get(url).then((response) => {
dispatch(expandGabTrendsFeedSuccess(response.data.rssFeedItems, feedId, response.data.pagination.p))
}).catch((error) => {
dispatch(expandGabTrendsFeedFail(error, feedId))
......@@ -101,9 +101,9 @@ export const fetchGabNews = () => (dispatch, getState) => {
dispatch(fetchGabNewsRequest())
// const url = 'https://news.gab.com/feed/json'
api(getState).get(`/api/v1/gab_trends?type=news`).then((response) => {
// axios.get(url).then((response) => {
const url = 'https://news.gab.com/feed/json'
// api(getState).get(`/api/v1/gab_trends?type=news`).then((response) => {
axios.get(url).then((response) => {
dispatch(fetchGabNewsSuccess(response.data.items))
}).catch((error) => {
dispatch(fetchGabNewsFail(error))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment