18 lines
354 B
JavaScript
18 lines
354 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;
|