Retrieve live JSON feed; delete fixture data
parent
c2f0af7e37
commit
3a37bfc409
|
@ -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
Loading…
Reference in New Issue