1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00
onion/js/fetchers/edition_list_fetcher.js

20 lines
465 B
JavaScript

import fetch from 'isomorphic-fetch';
import AppConstants from '../constants/application_constants';
let EditionListFetcher = {
/**
* Fetches a list of editions from the API.
*/
fetch() {
return fetch(AppConstants.baseUrl + 'pieces/', {
headers: {
'Authorization': 'Basic ' + AppConstants.debugCredentialBase64
}
}).then((res) => res.json());
}
};
export default EditionListFetcher;