bugfix: adds datacite host url

This commit is contained in:
Unix
2021-04-01 10:38:22 +02:00
committed by Mojib Wali
parent 0e5f08768d
commit 4698c797b2
3 changed files with 5 additions and 2 deletions

View File

@@ -58,10 +58,11 @@ export class DoiMint extends Component {
// get the prefix from backend
const prefix = this.configs.datacite_prefix;
const suffix = this.configs.datacite_suffix;
const host_url = this.configs.datacite_host_url
if (prefix !== null && suffix !== null) {
// get mapped DOI
const mapped = MapDatacite(this.metadata, this.record.id, prefix, suffix);
const mapped = MapDatacite(this.metadata, this.record.id, prefix, suffix, host_url);
const _fetchdoi = new FetchDoi("/getdoi");

View File

@@ -86,10 +86,12 @@ def get_datacite_details():
"""Application credentials for DOI."""
prefix = environ.get("INVENIO_DATACITE_PREFIX")
suffix = environ.get("INVENIO_DATACITE_SUFFIX")
host_url = environ.get("INVENIO_SITE_HOSTNAME")
details = {
"datacite_prefix": prefix,
"datacite_suffix": suffix,
"datacite_host_url": host_url,
}
return details

View File

@@ -40,7 +40,7 @@ theme = WebpackThemeBundle(
'@ckeditor/ckeditor5-react': '^2.1.0',
# datacite - rest api plugin
'datacite-rest': '^0.1.7',
'datacite-rest': '^0.1.8',
},
)