Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #31 from admin-ch/feature/exception
Browse files Browse the repository at this point in the history
  • Loading branch information
gstoehld authored Jan 5, 2022
2 parents 621b4b5 + 9022512 commit 9138b06
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

public interface TestTypes {
public static String TEST_TYPE_ANTIBODY = "94504-8";
public static String TEST_TYPE_EXEMPTION = "medical-exemption";
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public PdfResponse getPdf(BitPdfPayload payload) throws JsonProcessingException
.getTt()
.equals(TestTypes.TEST_TYPE_ANTIBODY)) {
endpoint = pdfConfig.getAntibodyEndpoint();
} else if(((DecodedTCert) decodedCert)
.getT()
.get(0)
.getTt()
.equals(TestTypes.TEST_TYPE_EXEMPTION)){
endpoint = pdfConfig.getExemptionEndpoint();
} else {
endpoint = pdfConfig.getTestEndpoint();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class PdfConfig {
private String recoveryEndpoint;
private String vaccinationEndpoint;
private String antibodyEndpoint;
private String exemptionEndpoint;

private String vaccinationTouristEndpoint;

Expand Down Expand Up @@ -59,4 +60,11 @@ public void setVaccinationTouristEndpoint(String vaccinationTouristEndpoint) {
this.vaccinationTouristEndpoint = vaccinationTouristEndpoint;
}

public String getExemptionEndpoint() {
return exemptionEndpoint;
}

public void setExemptionEndpoint(String exemptionEndpoint) {
this.exemptionEndpoint = exemptionEndpoint;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ transform.pdf.recovery-endpoint=http://localhost:8082/app/transform/v1/recovery
transform.pdf.vaccination-endpoint=http://localhost:8082/app/transform/v1/vaccination
transform.pdf.vaccination-tourist-endpoint=http://localhost:8082/app/transform/v1/vaccination-tourist
transform.pdf.antibody-endpoint=http://localhost:8082/app/transform/v1/antibody
transform.pdf.exemption-endpoint=http://localhost:8082/app/transform/v1/exceptional

transform.pdf.chIssuers[0]=CH
transform.pdf.chIssuers[1]=CH BAG

logging.config=classpath:local-logback.xml
logging.config=classpath:local-logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ transform.pdf.recovery-endpoint=/app/transform/v1/recovery
transform.pdf.vaccination-endpoint=/app/transform/v1/vaccination
transform.pdf.vaccination-tourist-endpoint=/app/transform/v1/vaccination-tourist
transform.pdf.antibody-endpoint=/app/transform/v1/antibody
transform.pdf.exemption-endpoint=/app/transform/v1/exceptional

transform.pdf.chIssuers[0]=CH
transform.pdf.chIssuers[1]=CH BAG

ws.rate-limit=10
ws.rate-limit=10

0 comments on commit 9138b06

Please sign in to comment.