feature/IO-3060-Realtime-Notifications-Progress Update

This commit is contained in:
Dave Richer
2025-01-10 09:33:47 -08:00
parent e2e5f3f885
commit 3bc6504ae6
8 changed files with 53 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
const handlePartsDispatchChange = (req, res) => {
return res.status(200).json({ message: "Parts Dispatch change handled." });
};
module.exports = handlePartsDispatchChange;

View File

@@ -0,0 +1,5 @@
const handlePartsOrderChange = (req, res) => {
return res.status(200).json({ message: "Parts Order change handled." });
};
module.exports = handlePartsOrderChange;

View File

@@ -0,0 +1,5 @@
const handleTasksChange = (req, res) => {
return res.status(200).json({ message: "Tasks change handled." });
};
module.exports = handleTasksChange;

View File

@@ -0,0 +1,5 @@
const handleTimeTicketsChange = (req, res) => {
return res.status(200).json({ message: "Time Tickets change handled." });
};
module.exports = handleTimeTicketsChange;

View File

@@ -4,6 +4,9 @@ const { subscribe, unsubscribe, sendNotification } = require("../firebase/fireba
const eventAuthorizationMiddleware = require("../middleware/eventAuthorizationMIddleware");
const handleJobChange = require("../notifications/eventHandlers/handeJobChange");
const handleBillChange = require("../notifications/eventHandlers/handleBillChange");
const handlePartsOrderChange = require("../notifications/eventHandlers/handlePartsOrderChange");
const handlePartsDispatchChange = require("../notifications/eventHandlers/handlePartsDispatchChange");
const handleTasksChange = require("../notifications/eventHandlers/handleTasksChange");
const router = express.Router();
@@ -15,5 +18,9 @@ router.post("/sendtestnotification", validateFirebaseIdTokenMiddleware, sendNoti
// Hasura Entry points for creating notifications
router.post("/events/handleJobChange", eventAuthorizationMiddleware, handleJobChange);
router.post("/events/handleBillChange", eventAuthorizationMiddleware, handleBillChange);
router.post("/events/handlePartsOrderChange", eventAuthorizationMiddleware, handlePartsOrderChange);
router.post("/events/handlePartsDispatchChange", eventAuthorizationMiddleware, handlePartsDispatchChange);
router.post("/events/handleTasksChange", eventAuthorizationMiddleware, handleTasksChange);
router.post("/events/handleTimeTicketsChange", eventAuthorizationMiddleware, handleTasksChange);
module.exports = router;