mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
24 lines
890 B
JavaScript
24 lines
890 B
JavaScript
'use strict';
|
|
|
|
import walletConstants from './wallet_application_constants';
|
|
|
|
// gets subdomain as a parameter
|
|
function getWalletApiUrls(subdomain) {
|
|
if (subdomain === 'cyland'){
|
|
return {
|
|
'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/',
|
|
'piece': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/',
|
|
'piece_extradata': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/extradata/'
|
|
};
|
|
}
|
|
else if (subdomain === 'ikonotv'){
|
|
return {
|
|
'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/',
|
|
'piece': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/',
|
|
'user': walletConstants.walletApiEndpoint + subdomain + '/users/'
|
|
};
|
|
}
|
|
return {};
|
|
}
|
|
|
|
export default getWalletApiUrls; |