mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
rename apiUrls to ApiUrls
This commit is contained in:
parent
be62ece14e
commit
3afb036f24
@ -14,7 +14,7 @@ import GlobalNotificationModel from '../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
||||
|
||||
import { getLangText } from '../../utils/lang_utils.js';
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
|
||||
let AclButton = React.createClass({
|
||||
propTypes: {
|
||||
@ -42,7 +42,7 @@ let AclButton = React.createClass({
|
||||
<ConsignForm
|
||||
message={this.getConsignMessage()}
|
||||
id={this.getFormDataId()}
|
||||
url={apiUrls.ownership_consigns}/>
|
||||
url={ApiUrls.ownership_consigns}/>
|
||||
),
|
||||
handleSuccess: this.showNotification
|
||||
};
|
||||
@ -55,7 +55,7 @@ let AclButton = React.createClass({
|
||||
<UnConsignForm
|
||||
message={this.getUnConsignMessage()}
|
||||
id={this.getFormDataId()}
|
||||
url={apiUrls.ownership_unconsigns}/>
|
||||
url={ApiUrls.ownership_unconsigns}/>
|
||||
),
|
||||
handleSuccess: this.showNotification
|
||||
};
|
||||
@ -67,7 +67,7 @@ let AclButton = React.createClass({
|
||||
<TransferForm
|
||||
message={this.getTransferMessage()}
|
||||
id={this.getFormDataId()}
|
||||
url={apiUrls.ownership_transfers}/>
|
||||
url={ApiUrls.ownership_transfers}/>
|
||||
),
|
||||
handleSuccess: this.showNotification
|
||||
};
|
||||
@ -79,7 +79,7 @@ let AclButton = React.createClass({
|
||||
form: (<LoanForm
|
||||
message={this.getLoanMessage()}
|
||||
id={this.getFormDataId()}
|
||||
url={this.isPiece() ? apiUrls.ownership_loans_pieces : apiUrls.ownership_loans_editions}/>
|
||||
url={this.isPiece() ? ApiUrls.ownership_loans_pieces : ApiUrls.ownership_loans_editions}/>
|
||||
),
|
||||
handleSuccess: this.showNotification
|
||||
};
|
||||
@ -92,7 +92,7 @@ let AclButton = React.createClass({
|
||||
<ShareForm
|
||||
message={this.getShareMessage()}
|
||||
id={this.getFormDataId()}
|
||||
url={this.isPiece() ? apiUrls.ownership_shares_pieces : apiUrls.ownership_shares_editions }/>
|
||||
url={this.isPiece() ? ApiUrls.ownership_shares_pieces : ApiUrls.ownership_shares_editions }/>
|
||||
),
|
||||
handleSuccess: this.showNotification
|
||||
};
|
||||
|
@ -8,7 +8,7 @@ import ModalWrapper from '../ascribe_modal/modal_wrapper';
|
||||
import UnConsignRequestForm from './../ascribe_forms/form_unconsign_request';
|
||||
|
||||
import { getLangText } from '../../utils/lang_utils.js';
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
|
||||
|
||||
let UnConsignRequestButton = React.createClass({
|
||||
@ -29,7 +29,7 @@ let UnConsignRequestButton = React.createClass({
|
||||
handleSuccess={this.props.handleSuccess}
|
||||
title='Request to Un-Consign'>
|
||||
<UnConsignRequestForm
|
||||
url={apiUrls.ownership_unconsigns_request}
|
||||
url={ApiUrls.ownership_unconsigns_request}
|
||||
id={{'bitcoin_id': this.props.edition.bitcoin_id}}
|
||||
message={`${getLangText('Hi')},
|
||||
|
||||
|
@ -36,7 +36,7 @@ import DeleteButton from '../ascribe_buttons/delete_button';
|
||||
import GlobalNotificationModel from '../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
||||
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
import AppConstants from '../../constants/application_constants';
|
||||
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
@ -233,7 +233,7 @@ let EditionSummary = React.createClass({
|
||||
if (this.props.edition.status.length > 0 && this.props.edition.pending_new_owner && this.props.edition.acl.acl_withdraw_transfer) {
|
||||
withdrawButton = (
|
||||
<Form
|
||||
url={apiUrls.ownership_transfers_withdraw}
|
||||
url={ApiUrls.ownership_transfers_withdraw}
|
||||
getFormData={this.getTransferWithdrawData}
|
||||
handleSuccess={this.showNotification}
|
||||
className='inline'>
|
||||
@ -335,7 +335,7 @@ let EditionPersonalNote = React.createClass({
|
||||
if (this.props.currentUser.username && true || false) {
|
||||
return (
|
||||
<Form
|
||||
url={apiUrls.note_notes}
|
||||
url={ApiUrls.note_notes}
|
||||
handleSuccess={this.showNotification}>
|
||||
<Property
|
||||
name='note'
|
||||
@ -373,7 +373,7 @@ let EditionPublicEditionNote = React.createClass({
|
||||
if (isEditable || this.props.edition.public_note){
|
||||
return (
|
||||
<Form
|
||||
url={apiUrls.note_edition}
|
||||
url={ApiUrls.note_edition}
|
||||
handleSuccess={this.showNotification}>
|
||||
<Property
|
||||
name='note'
|
||||
|
@ -16,7 +16,7 @@ import ReactS3FineUploader from './../ascribe_uploader/react_s3_fine_uploader';
|
||||
import GlobalNotificationModel from '../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
||||
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
import AppConstants from '../../constants/application_constants';
|
||||
|
||||
import { getCookie } from '../../utils/fetch_api_utils';
|
||||
@ -133,7 +133,7 @@ let FileUploader = React.createClass({
|
||||
pieceId: this.props.pieceId
|
||||
}}
|
||||
createBlobRoutine={{
|
||||
url: apiUrls.blob_otherdatas,
|
||||
url: ApiUrls.blob_otherdatas,
|
||||
pieceId: this.props.pieceId
|
||||
}}
|
||||
validation={{
|
||||
|
@ -8,7 +8,7 @@ import Property from '../ascribe_forms/property';
|
||||
import GlobalNotificationModel from '../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
||||
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
|
||||
@ -37,7 +37,7 @@ let CreateEditionsForm = React.createClass({
|
||||
return (
|
||||
<Form
|
||||
ref='form'
|
||||
url={apiUrls.editions}
|
||||
url={ApiUrls.editions}
|
||||
getFormData={this.getFormData}
|
||||
handleSuccess={this.handleSuccess}
|
||||
spinner={
|
||||
|
@ -12,7 +12,7 @@ import UserActions from '../../actions/user_actions';
|
||||
import Form from './form';
|
||||
import Property from './property';
|
||||
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
import AppConstants from '../../constants/application_constants';
|
||||
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
@ -99,7 +99,7 @@ let LoginForm = React.createClass({
|
||||
<Form
|
||||
className="ascribe-form-bordered"
|
||||
ref="loginForm"
|
||||
url={apiUrls.users_login}
|
||||
url={ApiUrls.users_login}
|
||||
handleSuccess={this.handleSuccess}
|
||||
buttons={
|
||||
<button
|
||||
|
@ -5,7 +5,7 @@ import React from 'react';
|
||||
import requests from '../../utils/requests';
|
||||
import { getLangText } from '../../utils/lang_utils.js';
|
||||
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
|
||||
import Form from './form';
|
||||
import Property from './property';
|
||||
@ -35,7 +35,7 @@ let PieceExtraDataForm = React.createClass({
|
||||
if (defaultValue.length === 0 && !this.props.editable){
|
||||
return null;
|
||||
}
|
||||
let url = requests.prepareUrl(apiUrls.piece_extradata, {piece_id: this.props.pieceId});
|
||||
let url = requests.prepareUrl(ApiUrls.piece_extradata, {piece_id: this.props.pieceId});
|
||||
return (
|
||||
<Form
|
||||
ref='form'
|
||||
|
@ -11,7 +11,7 @@ import Property from './property';
|
||||
import ReactS3FineUploader from '../ascribe_uploader/react_s3_fine_uploader';
|
||||
|
||||
import AppConstants from '../../constants/application_constants';
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
|
||||
import { getCookie } from '../../utils/fetch_api_utils';
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
@ -95,7 +95,7 @@ let RegisterPieceForm = React.createClass({
|
||||
<Form
|
||||
className="ascribe-form-bordered"
|
||||
ref='form'
|
||||
url={apiUrls.pieces_list}
|
||||
url={ApiUrls.pieces_list}
|
||||
getFormData={this.getFormData}
|
||||
handleSuccess={this.props.handleSuccess}
|
||||
buttons={<button
|
||||
@ -179,7 +179,7 @@ let FileUploader = React.createClass({
|
||||
fileClass: 'digitalwork'
|
||||
}}
|
||||
createBlobRoutine={{
|
||||
url: apiUrls.blob_digitalworks
|
||||
url: ApiUrls.blob_digitalworks
|
||||
}}
|
||||
submitKey={this.props.submitKey}
|
||||
validation={{
|
||||
|
@ -4,7 +4,7 @@ import React from 'react';
|
||||
|
||||
import Alert from 'react-bootstrap/lib/Alert';
|
||||
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
import FormMixin from '../../mixins/form_mixin';
|
||||
|
||||
import AclButton from './../ascribe_buttons/acl_button';
|
||||
@ -19,24 +19,24 @@ let RequestActionForm = React.createClass({
|
||||
let edition = this.props.editions[0];
|
||||
if (e.target.id === 'request_accept'){
|
||||
if (edition.request_action === 'consign'){
|
||||
return apiUrls.ownership_consigns_confirm;
|
||||
return ApiUrls.ownership_consigns_confirm;
|
||||
}
|
||||
else if (edition.request_action === 'unconsign'){
|
||||
return apiUrls.ownership_unconsigns;
|
||||
return ApiUrls.ownership_unconsigns;
|
||||
}
|
||||
else if (edition.request_action === 'loan'){
|
||||
return apiUrls.ownership_loans_confirm;
|
||||
return ApiUrls.ownership_loans_confirm;
|
||||
}
|
||||
}
|
||||
else if(e.target.id === 'request_deny'){
|
||||
if (edition.request_action === 'consign') {
|
||||
return apiUrls.ownership_consigns_deny;
|
||||
return ApiUrls.ownership_consigns_deny;
|
||||
}
|
||||
else if (edition.request_action === 'unconsign') {
|
||||
return apiUrls.ownership_unconsigns_deny;
|
||||
return ApiUrls.ownership_unconsigns_deny;
|
||||
}
|
||||
else if (edition.request_action === 'loan') {
|
||||
return apiUrls.ownership_loans_deny;
|
||||
return ApiUrls.ownership_loans_deny;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -14,7 +14,7 @@ import Form from './form';
|
||||
import Property from './property';
|
||||
import InputCheckbox from './input_checkbox';
|
||||
|
||||
import apiUrls from '../../constants/api_urls';
|
||||
import ApiUrls from '../../constants/api_urls';
|
||||
|
||||
|
||||
let SignupForm = React.createClass({
|
||||
@ -79,7 +79,7 @@ let SignupForm = React.createClass({
|
||||
<Form
|
||||
className="ascribe-form-bordered"
|
||||
ref='form'
|
||||
url={apiUrls.users_signup}
|
||||
url={ApiUrls.users_signup}
|
||||
getFormData={this.getFormData}
|
||||
handleSuccess={this.handleSuccess}
|
||||
buttons={
|
||||
|
@ -10,7 +10,7 @@ import Form from './ascribe_forms/form';
|
||||
import Property from './ascribe_forms/property';
|
||||
import InputTextAreaToggable from './ascribe_forms/input_textarea_toggable';
|
||||
|
||||
import apiUrls from '../constants/api_urls';
|
||||
import ApiUrls from '../constants/api_urls';
|
||||
import { getLangText } from '../utils/lang_utils';
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ let CoaVerifyForm = React.createClass({
|
||||
return (
|
||||
<div>
|
||||
<Form
|
||||
url={apiUrls.coa_verify}
|
||||
url={ApiUrls.coa_verify}
|
||||
handleSuccess={this.handleSuccess}
|
||||
buttons={
|
||||
<button
|
||||
|
@ -5,7 +5,7 @@ import Router from 'react-router';
|
||||
|
||||
import Form from './ascribe_forms/form';
|
||||
import Property from './ascribe_forms/property';
|
||||
import apiUrls from '../constants/api_urls';
|
||||
import ApiUrls from '../constants/api_urls';
|
||||
|
||||
import GlobalNotificationModel from '../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../actions/global_notification_actions';
|
||||
@ -74,7 +74,7 @@ let PasswordRequestResetForm = React.createClass({
|
||||
return (
|
||||
<Form
|
||||
ref="form"
|
||||
url={apiUrls.users_password_reset_request}
|
||||
url={ApiUrls.users_password_reset_request}
|
||||
handleSuccess={this.handleSuccess}
|
||||
buttons={
|
||||
<button
|
||||
@ -130,7 +130,7 @@ let PasswordResetForm = React.createClass({
|
||||
return (
|
||||
<Form
|
||||
ref="form"
|
||||
url={apiUrls.users_password_reset}
|
||||
url={ApiUrls.users_password_reset}
|
||||
handleSuccess={this.handleSuccess}
|
||||
getFormData={this.getFormData}
|
||||
buttons={
|
||||
|
@ -22,7 +22,7 @@ import Form from './ascribe_forms/form';
|
||||
import Property from './ascribe_forms/property';
|
||||
import InputCheckbox from './ascribe_forms/input_checkbox';
|
||||
|
||||
import apiUrls from '../constants/api_urls';
|
||||
import ApiUrls from '../constants/api_urls';
|
||||
import AppConstants from '../constants/application_constants';
|
||||
import { getLangText } from '../utils/lang_utils';
|
||||
|
||||
@ -88,7 +88,7 @@ let AccountSettings = React.createClass({
|
||||
if (this.state.currentUser.username) {
|
||||
content = (
|
||||
<Form
|
||||
url={apiUrls.users_username}
|
||||
url={ApiUrls.users_username}
|
||||
handleSuccess={this.handleSuccess}>
|
||||
<Property
|
||||
name='username'
|
||||
@ -114,7 +114,7 @@ let AccountSettings = React.createClass({
|
||||
);
|
||||
profile = (
|
||||
<Form
|
||||
url={apiUrls.users_profile}
|
||||
url={ApiUrls.users_profile}
|
||||
handleSuccess={this.handleSuccess}
|
||||
getFormData={this.getFormDataProfile}>
|
||||
<Property
|
||||
@ -264,14 +264,14 @@ let FileUploader = React.createClass({
|
||||
fileClass: 'contract'
|
||||
}}
|
||||
createBlobRoutine={{
|
||||
url: apiUrls.ownership_loans_contract
|
||||
url: ApiUrls.ownership_loans_contract
|
||||
}}
|
||||
validation={{
|
||||
itemLimit: 100000,
|
||||
sizeLimit: '10000000'
|
||||
}}
|
||||
session={{
|
||||
endpoint: apiUrls.ownership_loans_contract,
|
||||
endpoint: ApiUrls.ownership_loans_contract,
|
||||
customHeaders: {
|
||||
'X-CSRFToken': getCookie(AppConstants.csrftoken)
|
||||
},
|
||||
@ -377,7 +377,7 @@ let APISettings = React.createClass({
|
||||
show={true}
|
||||
defaultExpanded={this.props.defaultExpanded}>
|
||||
<Form
|
||||
url={apiUrls.applications}
|
||||
url={ApiUrls.applications}
|
||||
handleSuccess={this.handleCreateSuccess}>
|
||||
<Property
|
||||
name='name'
|
||||
|
@ -25,7 +25,7 @@ import GlobalNotificationModel from '../../../../models/global_notification_mode
|
||||
import GlobalNotificationActions from '../../../../actions/global_notification_actions';
|
||||
|
||||
import AppConstants from '../../../../constants/application_constants';
|
||||
import apiUrls from '../../../../constants/api_urls';
|
||||
import ApiUrls from '../../../../constants/api_urls';
|
||||
|
||||
import { ColumnModel} from '../../../ascribe_table/models/table_models';
|
||||
import { getLangText } from '../../../../utils/lang_utils';
|
||||
@ -274,7 +274,7 @@ let PrizeJurySettings = React.createClass({
|
||||
return (
|
||||
<div>
|
||||
<Form
|
||||
url={apiUrls.jurys}
|
||||
url={ApiUrls.jurys}
|
||||
handleSuccess={this.handleCreateSuccess}
|
||||
ref='form'
|
||||
buttonSubmitText='INVITE'>
|
||||
|
@ -5,7 +5,7 @@ import getPrizeApiUrls from '../components/whitelabel/prize/constants/api_urls';
|
||||
import { update } from '../utils/general_utils';
|
||||
|
||||
|
||||
let apiUrls = {
|
||||
let ApiUrls = {
|
||||
'applications': AppConstants.apiEndpoint + 'applications/',
|
||||
'application_token_refresh': AppConstants.apiEndpoint + 'applications/refresh_token/',
|
||||
'blob_digitalworks': AppConstants.apiEndpoint + 'blob/digitalworks/',
|
||||
@ -63,7 +63,7 @@ export function updateApiUrls(type, subdomain) {
|
||||
if (type === 'prize') {
|
||||
newUrls = getPrizeApiUrls(subdomain);
|
||||
}
|
||||
update(apiUrls, newUrls);
|
||||
update(ApiUrls, newUrls);
|
||||
}
|
||||
|
||||
export default apiUrls;
|
||||
export default ApiUrls;
|
||||
|
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
import requests from '../utils/requests';
|
||||
import apiUrls from '../constants/api_urls';
|
||||
import ApiUrls from '../constants/api_urls';
|
||||
|
||||
let UserFetcher = {
|
||||
/**
|
||||
@ -13,7 +13,7 @@ let UserFetcher = {
|
||||
},
|
||||
|
||||
logout() {
|
||||
return requests.get(apiUrls.users_logout);
|
||||
return requests.get(ApiUrls.users_logout);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user