File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33module . exports = {
44 APP_NAME : 'CodeTorch' ,
55 APP_DOMAIN : 'https://codetorch.net' ,
6+ API_HOST : 'http://localhost:8093' ,
67 DEFAULT_CLOUD_HOST : 'wss://cloud.codetorch.net'
78} ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
33import { intlShape , injectIntl } from 'react-intl' ;
44import bindAll from 'lodash.bindall' ;
55import { connect } from 'react-redux' ;
6+ const { API_HOST } = require ( './brand' ) ;
67
78import { setProjectUnchanged } from '../reducers/project-changed' ;
89import {
@@ -198,8 +199,8 @@ const ProjectFetcherHOC = function (WrappedComponent) {
198199 vm : PropTypes . instanceOf ( VM )
199200 } ;
200201 ProjectFetcherComponent . defaultProps = {
201- assetHost : 'https:/ /assets.scratch.mit.edu ',
202- projectHost : 'https:/ /projects.scratch.mit.edu'
202+ assetHost : API_HOST + '/API /assets',
203+ projectHost : API_HOST + '/API /projects' ,
203204 } ;
204205
205206 const mapStateToProps = state => ( {
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Storage extends ScratchStorage {
5555 this . assetHost = assetHost ;
5656 }
5757 getAssetGetConfig ( asset ) {
58- return `${ this . assetHost } /internalapi/asset/ ${ asset . assetId } .${ asset . dataFormat } /get/ ` ;
58+ return `${ this . assetHost } /${ asset . assetId } .${ asset . dataFormat } ` ;
5959 }
6060 getAssetCreateConfig ( asset ) {
6161 return {
Original file line number Diff line number Diff line change @@ -3,13 +3,16 @@ import PropTypes from 'prop-types';
33import { connect } from 'react-redux' ;
44import log from './log' ;
55
6+
7+ const { API_HOST } = require ( './brand' ) ;
8+
69import { setProjectTitle } from '../reducers/project-title' ;
710import { setAuthor , setDescription } from '../reducers/tw' ;
811
912export const fetchProjectMeta = async projectId => {
1013 const urls = [
11- `https://trampoline.turbowarp.org/api/projects/ ${ projectId } `,
12- `https://trampoline.turbowarp.xyz/api/projects/ ${ projectId } `
14+ API_HOST + `/API/projectsMETA? ${ projectId } `,
15+ API_HOST + `/API/projectsMETA? ${ projectId } `
1316 ] ;
1417 let firstError ;
1518 for ( const url of urls ) {
You can’t perform that action at this time.
0 commit comments