feature/IO-3556-Chattr-Integration

This commit is contained in:
Dave
2026-02-10 12:48:48 -05:00
parent 56559dd3ff
commit 3745d7a414
11 changed files with 131 additions and 92 deletions

View File

@@ -0,0 +1,22 @@
const DEFAULT_COMPANY_ID = process.env.CHATTER_DEFAULT_COMPANY_ID;
const createLocation = (req, res) => {
const { logger } = req;
const { bodyshopID } = req.body;
// No Default company
if (!DEFAULT_COMPANY_ID) {
logger.log("chatter-create-location-no-default-company", "warn", null, null, { bodyshopID });
return res.json({ success: false });
}
// No Bodyshop data available
if (!bodyshopID) {
logger.log("chatter-create-location-invalid-bodyshop", "warn", null, null, { bodyshopID });
return res.json({ success: false });
}
return res.json({ success: true });
};
module.exports = createLocation;