// Middleware to inject sendNotification function into request
function websocketMiddleware(sendNotification, broadcastDispatch, broadcastNewAmbulanceRequest, broadcastRequestAssigned) {
    return (req, res, next) => {
        req.sendNotification = sendNotification;
        req.broadcastDispatch = broadcastDispatch;
        req.broadcastNewAmbulanceRequest = broadcastNewAmbulanceRequest;
        req.broadcastRequestAssigned = broadcastRequestAssigned;
        next();
    };
}

module.exports = websocketMiddleware;



