mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 17:45:10 +01:00
20 lines
427 B
JavaScript
20 lines
427 B
JavaScript
|
'use strict';
|
||
|
|
||
|
import requests from '../utils/requests';
|
||
|
|
||
|
let CoaFetcher = {
|
||
|
/**
|
||
|
* Fetch one user from the API.
|
||
|
* If no arg is supplied, load the current user
|
||
|
*/
|
||
|
fetchOne(id) {
|
||
|
return requests.get('coa', {'id': id});
|
||
|
},
|
||
|
create(bitcoinId) {
|
||
|
console.log(bitcoinId);
|
||
|
return requests.post('coa_create', {body: {'bitcoin_id': bitcoinId}});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default CoaFetcher;
|