mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
19 lines
451 B
JavaScript
19 lines
451 B
JavaScript
'use strict';
|
|
|
|
import fetch from '../utils/fetch';
|
|
|
|
import { generateOrderingQueryParams } from '../utils/fetch_api_utils';
|
|
|
|
|
|
let EditionListFetcher = {
|
|
/**
|
|
* Fetches a list of editions from the API.
|
|
*/
|
|
fetch(pieceId, orderBy, orderAsc) {
|
|
let ordering = generateOrderingQueryParams(orderBy, orderAsc);
|
|
return fetch.get('editions_list', { 'piece_id': pieceId, ordering });
|
|
}
|
|
};
|
|
|
|
export default EditionListFetcher;
|