onion/js/components/whitelabel/wallet/constants/wallet_api_urls.js

36 lines
1.8 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
};
} else if (subdomain === 'lumenus' || subdomain === '23vivi' ||
2016-02-24 11:16:56 +01:00
subdomain === 'polline' || subdomain === 'artcity' ||
2016-04-06 16:22:03 +02:00
subdomain === 'demo' || subdomain === 'liquidgallery') {
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;