updating the transaction

This commit is contained in:
Mann Patel
2025-04-22 16:33:23 -06:00
parent 9d05adacfb
commit b7937018e5
4 changed files with 105 additions and 71 deletions

View File

@@ -5,10 +5,10 @@ const {
getTransactionsByProduct,
getTransactionsByUser,
getAllTransactions,
updatePaymentStatus,
deleteTransaction,
getTransactionWithPagination,
removeTransation,
updateTransactionStatus,
} = require("../controllers/transaction");
const router = express.Router();
@@ -18,24 +18,12 @@ router.use((req, res, next) => {
next();
});
// Create a new transaction
router.post("/createTransaction", createTransaction);
// Get all transactions for a specific product
router.get("/getTransactionsByProduct/:productID", getTransactionsByProduct);
// Get all transactions for a specific user
router.post("/getTransactionsByUser", getTransactionsByUser);
// Get all transactions in the system
router.post("/updateStatus", updateTransactionStatus);
router.post("/getAllTransactions", getAllTransactions);
// Update payment status on a transaction
router.patch("/updatePaymentStatus", updatePaymentStatus);
// Delete a transaction
router.delete("/deleteTransaction", deleteTransaction);
router.get("/getTransactions", getTransactionWithPagination);
router.delete("/:id", removeTransation);