mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
25 lines
554 B
JavaScript
25 lines
554 B
JavaScript
'use strict';
|
|
|
|
import requests from '../utils/requests';
|
|
|
|
import ApiUrls from '../constants/api_urls';
|
|
|
|
let OwnershipFetcher = {
|
|
/**
|
|
* Fetch the default, public loan contract of a user from the API.
|
|
*/
|
|
fetchLoanContract(email) {
|
|
return requests.get(ApiUrls.ownership_loans_contract + '?loanee=' + email);
|
|
},
|
|
|
|
/**
|
|
* Fetch the contracts of the logged-in user from the API.
|
|
*/
|
|
fetchLoanContractList(){
|
|
return requests.get(ApiUrls.ownership_loans_contract);
|
|
}
|
|
|
|
};
|
|
|
|
export default OwnershipFetcher;
|