1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-25 02:46:09 +01:00
onion/js/components/whitelabel/wallet/constants/wallet_api_urls.js
2015-10-22 14:14:06 +02:00

33 lines
1.3 KiB
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/',
'user': walletConstants.walletApiEndpoint + subdomain + '/users/'
};
}
else if (subdomain === 'ikonotv'){
return {
'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/',
'piece': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/',
'user': walletConstants.walletApiEndpoint + subdomain + '/users/'
};
}
else if (subdomain === 'lumenus'){
return {
'editions': walletConstants.walletApiEndpoint + subdomain + '/editions/',
'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/',
'user': walletConstants.walletApiEndpoint + subdomain + '/users/'
};
}
return {};
}
export default getWalletApiUrls;