working on XML structure - dummy payload is completed and API call === 200

This commit is contained in:
2024-03-21 16:55:56 -05:00
parent 191164f4cc
commit 6dddc5799f
5 changed files with 33 additions and 20 deletions

View File

@@ -1,12 +1,10 @@
// routes/dataRoutes.js
import express from "express";
import { itemLookup } from "../controllers/dataController.js"; // Adjust the import path according to your project structure
import { itemLookup } from "../controllers/dataController.js";
const router = express.Router();
// Use the itemLookup function from dataController for the GET request to '/item-lookup'
router.get("/item-lookup", itemLookup);
// You can add more data-related routes here in the future
export default router;

View File

@@ -1,11 +1,10 @@
// routes/dataRoutes.js
import express from "express";
import { addItem } from "../controllers/inventoryController.js"; // Adjust the import path according to your project structure
import { addItem } from "../controllers/inventoryController.js";
const router = express.Router();
// Use the itemLookup function from dataController for the GET request to '/item-lookup'
router.get("/add-item", addItem);
router.post("/add-item", addItem);
// You can add more data-related routes here in the future

10
api/routes/itemLookup.js Normal file
View File

@@ -0,0 +1,10 @@
// routes/itemLookup.js
import express from "express";
import itemLookup from "../controllers/itemLookup.js";
const router = express.Router();
// Use the itemLookup controller for the POST request to '/item-lookup'
router.get("/item-lookup", itemLookup);
export default router;