mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
change api endpoints to contractblobs
This commit is contained in:
parent
7e1815bb1f
commit
96fdb598f7
@ -92,7 +92,7 @@ let ContractForm = React.createClass({
|
||||
<Form
|
||||
className="ascribe-form-bordered ascribe-form-wrapper"
|
||||
ref='form'
|
||||
url={ApiUrls.ownership_contract}
|
||||
url={ApiUrls.blob_contracts}
|
||||
handleSuccess={this.props.handleSuccess}
|
||||
buttons={<button
|
||||
type="submit"
|
||||
|
@ -36,14 +36,14 @@ let ContractSettings = React.createClass({
|
||||
fileClass: 'contract'
|
||||
}}
|
||||
createBlobRoutine={{
|
||||
url: ApiUrls.blob_otherdatas
|
||||
url: ApiUrls.blob_contracts
|
||||
}}
|
||||
validation={{
|
||||
itemLimit: 100000,
|
||||
sizeLimit: '50000000'
|
||||
}}
|
||||
session={{
|
||||
endpoint: ApiUrls.blob_otherdatas,
|
||||
endpoint: ApiUrls.blob_contracts,
|
||||
customHeaders: {
|
||||
'X-CSRFToken': getCookie(AppConstants.csrftoken)
|
||||
},
|
||||
|
@ -297,6 +297,9 @@ var ReactS3FineUploader = React.createClass({
|
||||
} else if(res.digitalwork) {
|
||||
file.s3Url = res.digitalwork.url_safe;
|
||||
file.s3UrlSafe = res.digitalwork.url_safe;
|
||||
} else if(res.contractblob) {
|
||||
file.s3Url = res.contractblob.url_safe;
|
||||
file.s3UrlSafe = res.contractblob.url_safe;
|
||||
} else {
|
||||
throw new Error(getLangText('Could not find a url to download.'));
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ let ApiUrls = {
|
||||
'application_token_refresh': AppConstants.apiEndpoint + 'applications/refresh_token/',
|
||||
'blob_digitalworks': AppConstants.apiEndpoint + 'blob/digitalworks/',
|
||||
'blob_otherdatas': AppConstants.apiEndpoint + 'blob/otherdatas/',
|
||||
'blob_contracts': AppConstants.apiEndpoint + 'blob/contracts/',
|
||||
'coa': AppConstants.apiEndpoint + 'coa/${id}/',
|
||||
'coa_create': AppConstants.apiEndpoint + 'coa/',
|
||||
'coa_verify': AppConstants.apiEndpoint + 'coa/verify_coa/',
|
||||
@ -38,7 +39,6 @@ let ApiUrls = {
|
||||
'ownership_loans_editions': AppConstants.apiEndpoint + 'ownership/loans/editions/',
|
||||
'ownership_loans_confirm': AppConstants.apiEndpoint + 'ownership/loans/editions/confirm/',
|
||||
'ownership_loans_deny': AppConstants.apiEndpoint + 'ownership/loans/editions/deny/',
|
||||
'ownership_contract': AppConstants.apiEndpoint + 'ownership/loans/editions/contract/',
|
||||
'ownership_shares_editions': AppConstants.apiEndpoint + 'ownership/shares/editions/',
|
||||
'ownership_shares_pieces': AppConstants.apiEndpoint + 'ownership/shares/pieces/',
|
||||
'ownership_transfers': AppConstants.apiEndpoint + 'ownership/transfers/',
|
||||
@ -46,6 +46,7 @@ let ApiUrls = {
|
||||
'ownership_unconsigns': AppConstants.apiEndpoint + 'ownership/unconsigns/',
|
||||
'ownership_unconsigns_deny': AppConstants.apiEndpoint + 'ownership/unconsigns/deny/',
|
||||
'ownership_unconsigns_request': AppConstants.apiEndpoint + 'ownership/unconsigns/request/',
|
||||
'ownership_contract': AppConstants.apiEndpoint + 'ownership/contracts/',
|
||||
'piece': AppConstants.apiEndpoint + 'pieces/${piece_id}/',
|
||||
'piece_extradata': AppConstants.apiEndpoint + 'pieces/${piece_id}/extradata/',
|
||||
'piece_first_edition_id': AppConstants.apiEndpoint + 'pieces/${piece_id}/edition_index/',
|
||||
|
@ -9,7 +9,7 @@ let OwnershipFetcher = {
|
||||
* Fetch the default, public contract of a user from the API.
|
||||
*/
|
||||
fetchContract(email) {
|
||||
return requests.get(ApiUrls.ownership_contract + '?loanee=' + email);
|
||||
return requests.get(ApiUrls.blob_contracts + '?loanee=' + email);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user