mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
21 lines
413 B
JavaScript
21 lines
413 B
JavaScript
'use strict';
|
|
|
|
import requests from '../../../../utils/requests';
|
|
|
|
|
|
let PrizeRatingFetcher = {
|
|
fetch() {
|
|
return requests.get('rating');
|
|
},
|
|
|
|
fetchOne(pieceId) {
|
|
return requests.get('rating', {'piece_id': pieceId});
|
|
},
|
|
|
|
rate(pieceId, rating) {
|
|
return requests.post('ratings', {body: {'piece_id': pieceId, 'rating': rating}});
|
|
}
|
|
};
|
|
|
|
export default PrizeRatingFetcher;
|