Skip to content

Commit

Permalink
Merge pull request #603 from desci-labs/metadata-upload
Browse files Browse the repository at this point in the history
Metadata upload
  • Loading branch information
shadrach-tayo authored Oct 29, 2024
2 parents b194ac3 + 5b63cad commit 348a8cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ CROSSREF_METADATA_API=https://test.crossref.org/servlet/deposit
CROSSREF_ADMIN_API=https://test.crossref.org
CROSSREF_EMAIL=
CROSSREF_LOGIN=
CROSSREF_LOGIN_ROLE=
CROSSREF_PASSWORD=

# Cross ref notification callback envs
Expand Down
2 changes: 1 addition & 1 deletion desci-server/src/services/crossRef/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class CrossRefClient {

const metadata = Remixml.parse2txt(metadataTemplate, param);

const url = `${process.env.CROSSREF_METADATA_API}?operation=doMDUpload&login_id=${process.env.CROSSREF_LOGIN || 'dslb'}&login_passwd=${process.env.CROSSREF_PASSWORD || 'pgz6wze1fmg-RPN_qkv'}`;
const url = `${process.env.CROSSREF_METADATA_API}?operation=doMDUpload&login_id=${process.env.CROSSREF_LOGIN}/dslb&login_passwd=${process.env.CROSSREF_PASSWORD}`;
logger.info({ param, metadata, url }, 'METADATA TO POST');
const buffer = Buffer.from(metadata, 'utf8');

Expand Down
1 change: 1 addition & 0 deletions desci-server/src/types/ProcessEnv.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ declare namespace NodeJS {
CROSSREF_METADATA_API: string;
ORCID_API_DOMAIN: string;
CROSSREF_LOGIN: string;
CROSSREF_LOGIN_ROLE: string;
CROSSREF_PASSWORD: string;
CROSSREF_NOTIFY_ENDPOINT: string;
CROSSREF_API_KEY: string;
Expand Down

0 comments on commit 348a8cd

Please sign in to comment.