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
2015-05-22 16:51:08 +02:00

20 lines
497 B
JavaScript

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