Retrieve live JSON feed; delete fixture data

pull/10616/head
Jared Scheib 2017-06-13 17:57:25 -07:00
parent c2f0af7e37
commit 3a37bfc409
2 changed files with 9 additions and 696 deletions

View File

@ -1,9 +1,10 @@
// import {get} from 'utils/ajax'
import AJAX from 'utils/ajax'
import {fixtureJSONFeed} from 'src/status/fixtures'
// TODO: remove async/await & object return, uncomment get(url) when proxy route implemented
// export const fetchJSONFeed = async url => {
export const fetchJSONFeed = async () => {
return await {data: fixtureJSONFeed}
// get(url)
}
export const fetchJSONFeed = url =>
AJAX({
method: 'GET',
url,
// For explanation of why this header makes this work:
// https://stackoverflow.com/questions/22968406/how-to-skip-the-options-preflight-request-in-angularjs
headers: {'Content-Type': 'text/plain'},
})

File diff suppressed because one or more lines are too long