Skip to content
Snippets Groups Projects
Commit 2c2a4e73 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Adjust for API entity renames

Handle the new and old naming for now
parent fef19d05
Branches
No related tags found
No related merge requests found
Pipeline #54301 passed
...@@ -268,7 +268,12 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem ...@@ -268,7 +268,12 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
break; break;
case "entryPointUrl": case "entryPointUrl":
JSONLD.getInstance(this.entryPointUrl).then((jsonld) => { JSONLD.getInstance(this.entryPointUrl).then((jsonld) => {
let apiUrlBase = jsonld.getApiUrlForEntityName("AdvancedlySignedDocument"); let apiUrlBase;
try {
apiUrlBase = jsonld.getApiUrlForEntityName("EsignAdvancedlySignedDocument");
} catch (error) {
apiUrlBase = jsonld.getApiUrlForEntityName("AdvancedlySignedDocument");
}
this.fileSourceUrl = apiUrlBase; this.fileSourceUrl = apiUrlBase;
}); });
break; break;
......
...@@ -285,7 +285,14 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle ...@@ -285,7 +285,14 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
// fetch pdf from api gateway with sessionId // fetch pdf from api gateway with sessionId
JSONLD.getInstance(this.entryPointUrl).then((jsonld) => { JSONLD.getInstance(this.entryPointUrl).then((jsonld) => {
const apiUrl = jsonld.getApiUrlForEntityName("QualifiedlySignedDocument") + '/' + encodeURIComponent(sessionId) + '?fileName=' + let apiUrlBase;
try {
apiUrlBase = jsonld.getApiUrlForEntityName("EsignQualifiedlySignedDocument");
} catch (error) {
apiUrlBase = jsonld.getApiUrlForEntityName("QualifiedlySignedDocument");
}
const apiUrl = apiUrlBase + '/' + encodeURIComponent(sessionId) + '?fileName=' +
encodeURIComponent(fileName); encodeURIComponent(fileName);
fetch(apiUrl, { fetch(apiUrl, {
...@@ -378,7 +385,12 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle ...@@ -378,7 +385,12 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
break; break;
case "entryPointUrl": case "entryPointUrl":
JSONLD.getInstance(this.entryPointUrl).then((jsonld) => { JSONLD.getInstance(this.entryPointUrl).then((jsonld) => {
const apiUrlBase = jsonld.getApiUrlForEntityName("QualifiedSigningRequest"); let apiUrlBase;
try {
apiUrlBase = jsonld.getApiUrlForEntityName("EsignQualifiedSigningRequest");
} catch (error) {
apiUrlBase = jsonld.getApiUrlForEntityName("QualifiedSigningRequest");
}
this.fileSourceUrl = apiUrlBase ; this.fileSourceUrl = apiUrlBase ;
}); });
break; break;
......
...@@ -215,7 +215,12 @@ class SignatureVerificationFull extends ScopedElementsMixin(DBPSignatureLitEleme ...@@ -215,7 +215,12 @@ class SignatureVerificationFull extends ScopedElementsMixin(DBPSignatureLitEleme
break; break;
case "entryPointUrl": case "entryPointUrl":
JSONLD.getInstance(this.entryPointUrl).then((jsonld) => { JSONLD.getInstance(this.entryPointUrl).then((jsonld) => {
const apiUrlBase = jsonld.getApiUrlForEntityName("ElectronicSignatureVerificationReport"); let apiUrlBase;
try {
apiUrlBase = jsonld.getApiUrlForEntityName("EsignElectronicSignatureVerificationReport");
} catch (error) {
apiUrlBase = jsonld.getApiUrlForEntityName("ElectronicSignatureVerificationReport");
}
this.fileSourceUrl = apiUrlBase; this.fileSourceUrl = apiUrlBase;
}); });
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment