diff --git a/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js b/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js index 094977f..e665008 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js +++ b/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js @@ -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"); diff --git a/invenio_theme_tugraz/views.py b/invenio_theme_tugraz/views.py index c847035..1c15bc8 100644 --- a/invenio_theme_tugraz/views.py +++ b/invenio_theme_tugraz/views.py @@ -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 diff --git a/invenio_theme_tugraz/webpack.py b/invenio_theme_tugraz/webpack.py index 5d9a12e..70c92f7 100644 --- a/invenio_theme_tugraz/webpack.py +++ b/invenio_theme_tugraz/webpack.py @@ -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', }, )