Files
bodyshop/server/utils/ioHelpers.js
Dave Richer 5114138c67 docker-redis - final cleanup
Signed-off-by: Dave Richer <dave@imexsystems.ca>
2024-10-03 16:30:15 -04:00

18 lines
362 B
JavaScript

const applyIOHelpers = ({ app, api, io, logger }) => {
const getBodyshopRoom = (bodyshopID) => `bodyshop-broadcast-room:${bodyshopID}`;
const ioHelpersAPI = {
getBodyshopRoom
};
// Helper middleware
app.use((req, res, next) => {
req.ioHelpers = ioHelpersAPI;
next();
});
return ioHelpersAPI;
};
module.exports = { applyIOHelpers };