Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 9317c78

Browse files
committed
Add public url to config, create DOI
1 parent 3d3b895 commit 9317c78

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

config.js.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var bindaas_api_key = "4fbb38a3-1821-436c-a44d-8d3bc5efd33e";
77
/* URL Configuration*/
88
var DOI_NAMESPACE = "10.5072/FK2";
99
var URL_PREFIX = "http://localhost:3001/details?doi=";
10+
var URL_PREFIX_PUBLIC = "http://localhost:3003/details?doi=";
1011
var URL_HOST = "http://dragon.cci.emory.edu/tcia_pubhub";
1112

1213
/* MetaData */
@@ -50,6 +51,7 @@ exports.ezid_password = ezid_password;
5051
exports.bindaas_api_key = bindaas_api_key;
5152
exports.DOI_NAMESPACE = DOI_NAMESPACE;
5253
exports.URL_PREFIX = URL_PREFIX;
54+
exports.URL_PREFIX_PUBLIC = URL_PREFIX_PUBLIC;
5355

5456
exports.bindaas_postDOIMetadata = bindaas_postDOIMetadata;
5557
exports.bindaas_getAll = bindaas_getAll;

public/javascripts/browserify/create.entry.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/javascripts/src/Create.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ var Form = React.createClass({
224224
console.log(data.doi_namespace);
225225
var year = self.state.year;
226226
var doi = data.doi_namespace + "." + year + "." + makeID(8);
227-
var url = data.url_prefix + doi;
227+
var url = data.url_prefix_public + doi;
228228
console.log(url);
229229

230230
self.setState({ url: url, doi: doi });

routes/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var citeproc_url = config.citeproc_server;
4545

4646
var DOI_NAMESPACE = config.DOI_NAMESPACE;
4747
var URL_PREFIX = config.URL_PREFIX;
48+
var URL_PREFIX_PUBLIC = config.URL_PREFIX_PUBLIC;
4849
var URL_HOST = config.URL_HOST;
4950

5051
var createUrl = function(endpoint) {
@@ -251,6 +252,7 @@ function createJSON(formdata) {
251252
router.get("/api/getDOINamespace", function(req, res) {
252253
res.json({
253254
doi_namespace: DOI_NAMESPACE,
255+
url_prefix_public: URL_PREFIX_PUBLIC,
254256
url_prefix: URL_PREFIX,
255257
url_host: URL_HOST
256258
});

0 commit comments

Comments
 (0)