doimint: adds suffix config

This commit is contained in:
Mojib Wali
2021-03-17 10:15:30 +01:00
committed by GitHub
parent c87e65d89f
commit a4558e02bf
3 changed files with 6 additions and 3 deletions

View File

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

View File

@@ -85,9 +85,11 @@ def comingsoon():
def get_datacite_details(): def get_datacite_details():
"""Application credentials for DOI.""" """Application credentials for DOI."""
prefix = environ.get("INVENIO_DATACITE_PREFIX") prefix = environ.get("INVENIO_DATACITE_PREFIX")
suffix = environ.get("INVENIO_DATACITE_SUFFIX")
details = { details = {
"datacite_prefix": prefix, "datacite_prefix": prefix,
"datacite_suffix": suffix,
} }
return details return details

View File

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