1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-24 18:36:10 +01:00
onion/js/components/whitelabel/wallet/constants/wallet_api_urls.js

34 lines
1.7 KiB
JavaScript
Raw Normal View History

'use strict';
import walletConstants from './wallet_application_constants';
2015-08-12 09:30:24 +02:00
// gets subdomain as a parameter
function getWalletApiUrls(subdomain) {
2015-11-05 13:51:40 +01:00
if (subdomain === 'cyland') {
return {
'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/',
2015-08-25 10:47:38 +02:00
'piece': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/',
2015-09-18 09:46:37 +02:00
'piece_extradata': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/extradata/',
'user': walletConstants.walletApiEndpoint + subdomain + '/users/'
};
2015-11-05 13:51:40 +01:00
} else if (subdomain === 'ikonotv') {
2015-08-18 12:08:01 +02:00
return {
'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/',
2015-09-08 11:35:34 +02:00
'piece': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/',
'user': walletConstants.walletApiEndpoint + subdomain + '/users/'
2015-08-18 12:08:01 +02:00
};
2015-11-24 12:08:37 +01:00
} else if (subdomain === 'lumenus' || subdomain === '23vivi') {
return {
2015-11-24 18:17:38 +01:00
'editions_list': walletConstants.walletApiEndpoint + 'markets/' + subdomain + '/pieces/${piece_id}/editions/',
'edition': walletConstants.walletApiEndpoint + 'markets/' + subdomain + '/editions/${bitcoin_id}/',
'pieces_list': walletConstants.walletApiEndpoint + 'markets/' + subdomain + '/pieces/',
'piece': walletConstants.walletApiEndpoint + 'markets/' + subdomain + '/pieces/${piece_id}/',
'piece_extradata': walletConstants.walletApiEndpoint + 'markets/' + subdomain + '/pieces/${piece_id}/extradata/',
'user': walletConstants.walletApiEndpoint + 'markets/' + subdomain + '/users/'
};
}
2015-08-12 09:30:24 +02:00
return {};
}
export default getWalletApiUrls;