mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
application constants
This commit is contained in:
parent
f4c6e025ae
commit
5e7f7983e1
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
//import Router from 'react-router';
|
||||
import Router from 'react-router';
|
||||
|
||||
import UserActions from '../actions/user_actions';
|
||||
import UserStore from '../stores/user_store';
|
||||
@ -16,7 +16,7 @@ import LoginForm from '../components/ascribe_forms/form_login';
|
||||
|
||||
import { getLangText } from '../utils/lang_utils';
|
||||
|
||||
//let Link = Router.Link;
|
||||
let Link = Router.Link;
|
||||
|
||||
let Header = React.createClass({
|
||||
|
||||
|
@ -3,27 +3,27 @@
|
||||
import AppConstants from './application_constants';
|
||||
|
||||
let apiUrls = {
|
||||
'piece': AppConstants.baseUrl + 'pieces/${piece_id}',
|
||||
'pieces_list': AppConstants.baseUrl + 'pieces/',
|
||||
'piece_extradata': AppConstants.baseUrl + 'pieces/${piece_id}/extradata/',
|
||||
'edition': AppConstants.baseUrl + 'editions/${bitcoin_id}/',
|
||||
'editions_list': AppConstants.baseUrl + 'pieces/${piece_id}/editions/',
|
||||
'edition_delete': AppConstants.baseUrl + 'editions/${edition_id}/',
|
||||
'edition_remove_from_collection': AppConstants.baseUrl + 'ownership/shares/${edition_id}/',
|
||||
'ownership_shares_mail': AppConstants.baseUrl + 'ownership/shares/mail/',
|
||||
'ownership_transfers': AppConstants.baseUrl + 'ownership/transfers/',
|
||||
'ownership_consigns': AppConstants.baseUrl + 'ownership/consigns/',
|
||||
'ownership_consigns_confirm': AppConstants.baseUrl + 'ownership/consigns/confirm/',
|
||||
'ownership_consigns_deny': AppConstants.baseUrl + 'ownership/consigns/deny/',
|
||||
'ownership_unconsigns': AppConstants.baseUrl + 'ownership/unconsigns/',
|
||||
'ownership_unconsigns_request': AppConstants.baseUrl + 'ownership/unconsigns/request/',
|
||||
'ownership_unconsigns_deny': AppConstants.baseUrl + 'ownership/unconsigns/deny/',
|
||||
'ownership_loans': AppConstants.baseUrl + 'ownership/loans/',
|
||||
'ownership_loans_confirm': AppConstants.baseUrl + 'ownership/loans/confirm/',
|
||||
'ownership_loans_deny': AppConstants.baseUrl + 'ownership/loans/deny/',
|
||||
'note_notes': AppConstants.baseUrl + 'note/notes/',
|
||||
'user': AppConstants.baseUrl + 'users/',
|
||||
'users_login': AppConstants.baseUrl + 'users/login/'
|
||||
'piece': AppConstants.apiEndpoint + 'pieces/${piece_id}',
|
||||
'pieces_list': AppConstants.apiEndpoint + 'pieces/',
|
||||
'piece_extradata': AppConstants.apiEndpoint + 'pieces/${piece_id}/extradata/',
|
||||
'edition': AppConstants.apiEndpoint + 'editions/${bitcoin_id}/',
|
||||
'editions_list': AppConstants.apiEndpoint + 'pieces/${piece_id}/editions/',
|
||||
'edition_delete': AppConstants.apiEndpoint + 'editions/${edition_id}/',
|
||||
'edition_remove_from_collection': AppConstants.apiEndpoint + 'ownership/shares/${edition_id}/',
|
||||
'ownership_shares_mail': AppConstants.apiEndpoint + 'ownership/shares/mail/',
|
||||
'ownership_transfers': AppConstants.apiEndpoint + 'ownership/transfers/',
|
||||
'ownership_consigns': AppConstants.apiEndpoint + 'ownership/consigns/',
|
||||
'ownership_consigns_confirm': AppConstants.apiEndpoint + 'ownership/consigns/confirm/',
|
||||
'ownership_consigns_deny': AppConstants.apiEndpoint + 'ownership/consigns/deny/',
|
||||
'ownership_unconsigns': AppConstants.apiEndpoint + 'ownership/unconsigns/',
|
||||
'ownership_unconsigns_request': AppConstants.apiEndpoint + 'ownership/unconsigns/request/',
|
||||
'ownership_unconsigns_deny': AppConstants.apiEndpoint + 'ownership/unconsigns/deny/',
|
||||
'ownership_loans': AppConstants.apiEndpoint + 'ownership/loans/',
|
||||
'ownership_loans_confirm': AppConstants.apiEndpoint + 'ownership/loans/confirm/',
|
||||
'ownership_loans_deny': AppConstants.apiEndpoint + 'ownership/loans/deny/',
|
||||
'note_notes': AppConstants.apiEndpoint + 'note/notes/',
|
||||
'user': AppConstants.apiEndpoint + 'users/',
|
||||
'users_login': AppConstants.apiEndpoint + 'users/login/'
|
||||
};
|
||||
|
||||
export default apiUrls;
|
||||
|
@ -5,9 +5,9 @@ let constants = {
|
||||
|
||||
//FIXME: referring to a global variable in `window` is not
|
||||
// super pro. What if we render stuff on the server?
|
||||
'baseUrl': window.BASE_URL,
|
||||
//'baseUrl': window.BASE_URL,
|
||||
'apiEndpoint': window.API_ENDPOINT,
|
||||
//'baseUrl': 'http://staging.ascribe.io/api/',
|
||||
'baseUrl': 'http://staging.ascribe.io/api/',
|
||||
'debugCredentialBase64': 'ZGltaUBtYWlsaW5hdG9yLmNvbTowMDAwMDAwMDAw', // dimi@mailinator:0000000000
|
||||
'aclList': ['edit', 'consign', 'consign_request', 'unconsign', 'unconsign_request', 'transfer',
|
||||
'loan', 'loan_request', 'share', 'download', 'view', 'delete', 'del_from_collection', 'add_to_collection']
|
||||
|
Loading…
Reference in New Issue
Block a user