mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
25 lines
613 B
JavaScript
25 lines
613 B
JavaScript
import fetch from 'isomorphic-fetch';
|
|
|
|
import AppConstants from '../constants/application_constants';
|
|
import FetchApiUtils from '../utils/fetch_api_utils';
|
|
|
|
|
|
let EditionFetcher = {
|
|
/**
|
|
* Fetch one user from the API.
|
|
* If no arg is supplied, load the current user
|
|
*
|
|
*/
|
|
fetchOne(editionId) {
|
|
return fetch(AppConstants.baseUrl + 'editions/' + editionId + '/', {
|
|
headers: {
|
|
'Authorization': 'Basic ' + AppConstants.debugCredentialBase64
|
|
}
|
|
}).then(
|
|
(res) => res.json()
|
|
);
|
|
}
|
|
};
|
|
|
|
export default EditionFetcher;
|