Skip to content

Commit

Permalink
Update server app's 2022, 2023, and 2024 Formio API routes to include…
Browse files Browse the repository at this point in the history
… routes for fetching a PDF of a form submission
  • Loading branch information
courtneymyers committed Jan 23, 2025
1 parent 2443f0c commit bfb4826
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/server/app/routes/formio2022.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const {
uploadS3FileMetadata,
downloadS3FileMetadata,
//
fetchSubmissionPDF,
//
fetchFRFSubmissions,
createFRFSubmission,
fetchFRFSubmission,
Expand Down Expand Up @@ -49,6 +51,11 @@ router.post(
},
);

// --- get a PDF of a 2022 form submission from Formio
router.get("/pdf/:formType/:mongoId", fetchBapComboKeys, (req, res) => {
fetchSubmissionPDF({ rebateYear, req, res });
});

// --- get user's 2022 FRF submissions from Formio
router.get("/frf-submissions", fetchBapComboKeys, (req, res) => {
fetchFRFSubmissions({ rebateYear, req, res });
Expand Down
7 changes: 7 additions & 0 deletions app/server/app/routes/formio2023.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const {
uploadS3FileMetadata,
downloadS3FileMetadata,
//
fetchSubmissionPDF,
//
fetchFRFSubmissions,
createFRFSubmission,
fetchFRFSubmission,
Expand Down Expand Up @@ -61,6 +63,11 @@ router.post(
},
);

// --- get a PDF of a 2023 form submission from Formio
router.get("/pdf/:formType/:mongoId", fetchBapComboKeys, (req, res) => {
fetchSubmissionPDF({ rebateYear, req, res });
});

// --- get user's 2023 FRF submissions from Formio
router.get("/frf-submissions", fetchBapComboKeys, (req, res) => {
fetchFRFSubmissions({ rebateYear, req, res });
Expand Down
7 changes: 7 additions & 0 deletions app/server/app/routes/formio2024.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const {
uploadS3FileMetadata,
downloadS3FileMetadata,
//
fetchSubmissionPDF,
//
fetchFRFSubmissions,
createFRFSubmission,
fetchFRFSubmission,
Expand Down Expand Up @@ -61,6 +63,11 @@ router.post(
},
);

// --- get a PDF of a 2024 form submission from Formio
router.get("/pdf/:formType/:mongoId", fetchBapComboKeys, (req, res) => {
fetchSubmissionPDF({ rebateYear, req, res });
});

// --- get user's 2024 FRF submissions from Formio
router.get("/frf-submissions", fetchBapComboKeys, (req, res) => {
fetchFRFSubmissions({ rebateYear, req, res });
Expand Down

0 comments on commit bfb4826

Please sign in to comment.