mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
storage.js can use PROJECT_HOST env setting (#2146)
This commit is contained in:
parent
ab08aa4281
commit
341428ce50
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
import ScratchStorage from 'scratch-storage';
|
||||
|
||||
const PROJECT_SERVER = 'https://projects.scratch.mit.edu';
|
||||
const PROJECT_HOST = process.env.PROJECT_HOST || 'https://projects.scratch.mit.edu';
|
||||
|
||||
/**
|
||||
* Wrapper for ScratchStorage which adds default web sources.
|
||||
|
@ -14,8 +14,8 @@ class Storage extends ScratchStorage {
|
|||
projectAsset => {
|
||||
const [projectId, revision] = projectAsset.assetId.split('.');
|
||||
return revision ?
|
||||
`${PROJECT_SERVER}/internalapi/project/${projectId}/get/${revision}` :
|
||||
`${PROJECT_SERVER}/internalapi/project/${projectId}/get/`;
|
||||
`${PROJECT_HOST}/internalapi/project/${projectId}/get/${revision}` :
|
||||
`${PROJECT_HOST}/internalapi/project/${projectId}/get/`;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue