feature/IO-3255-simplified-parts-management - Expand Joblines Parser, remove body-parser reference in favor of express.raw

This commit is contained in:
Dave Richer
2025-07-17 13:31:02 -04:00
parent 254fb4f77f
commit 7a1e7bd4f9
2 changed files with 39 additions and 28 deletions

View File

@@ -1,6 +1,5 @@
const express = require("express");
const router = express.Router();
const bodyParser = require("body-parser");
// Pull secrets from env
const { VSSTA_INTEGRATION_SECRET, PARTS_MANAGEMENT_INTEGRATION_SECRET } = process.env;
@@ -29,7 +28,7 @@ if (typeof PARTS_MANAGEMENT_INTEGRATION_SECRET === "string" && PARTS_MANAGEMENT_
*/
router.post(
"/parts-management/VehicleDamageEstimateAddRq",
bodyParser.raw({ type: "application/xml", limit: XML_BODY_LIMIT }), // Parse XML body
express.raw({ type: "application/xml", limit: XML_BODY_LIMIT }), // Parse XML body
partsManagementIntegrationMiddleware,
partsManagementVehicleDamageEstimateAddRq
);
@@ -39,7 +38,7 @@ if (typeof PARTS_MANAGEMENT_INTEGRATION_SECRET === "string" && PARTS_MANAGEMENT_
*/
router.post(
"/parts-management/VehicleDamageEstimateChqRq",
bodyParser.raw({ type: "application/xml", limit: XML_BODY_LIMIT }), // Parse XML body
express.raw({ type: "application/xml", limit: XML_BODY_LIMIT }), // Parse XML body
partsManagementIntegrationMiddleware,
partsManagementVehicleDamageEstimateChqRq
);