mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
20 lines
497 B
JavaScript
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; |