1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

add exception for loaning a piece for ikonotv

This commit is contained in:
Tim Daubenschütz 2015-08-28 12:20:36 +02:00
parent 89f68abcec
commit 2c26aab8cc
3 changed files with 7 additions and 4 deletions

View File

@ -84,8 +84,11 @@ let PieceContainer = React.createClass({
IT SHOULD BE REMOVED AND REPLACED WITH A BETTER SOLUTION ASAP!
ALSO, WE ENABLED THE LOAN BUTTON FOR IKONOTV TO LET THEM LOAN ON A PIECE LEVEL
*/
if(state && state.piece && state.piece.acl && typeof state.piece.acl.acl_loan !== 'undefined') {
let subdomain = window.location.host.split('.')[0];
if(subdomain !== 'ikonotv' && state && state.piece && state.piece.acl && typeof state.piece.acl.acl_loan !== 'undefined') {
let pieceState = mergeOptions({}, state.piece);
pieceState.acl.acl_loan = false;

View File

@ -13,8 +13,8 @@ function getWalletApiUrls(subdomain) {
}
else if (subdomain === 'ikonotv'){
return {
'pieces_list': walletConstants.walletApiEndpoint + 'cyland' + '/pieces/',
'piece': walletConstants.walletApiEndpoint + 'cyland' + '/pieces/${piece_id}/'
'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/',
'piece': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/'
};
}
return {};

View File

@ -74,7 +74,7 @@ let ROUTES = {
<Route name="request_loan" path="request_loan" handler={IkonotvRequestLoan}/>
<Route name="register_piece" path="register_piece" handler={RegisterPiece} headerTitle="+ NEW WORK"/>
<Route name="pieces" path="collection" handler={IkonotvPieceList} headerTitle="COLLECTION"/>
<Route name="piece" path="pieces/:pieceId" handler={CylandPieceContainer} />
<Route name="piece" path="pieces/:pieceId" handler={PieceContainer} />
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
<Route name="settings" path="settings" handler={SettingsContainer} />
</Route>