Merged in release/2024-01-12 (pull request #1161)

IO-2520 Adjust to imexshopid instead of shopname & prettify
This commit is contained in:
Allan Carr
2024-01-13 05:12:28 +00:00
2 changed files with 12 additions and 5 deletions

View File

@@ -29,17 +29,24 @@ const ftpSetup = {
password: process.env.KAIZEN_PASSWORD, password: process.env.KAIZEN_PASSWORD,
debug: (message, ...data) => logger.log(message, "DEBUG", "api", null, data), debug: (message, ...data) => logger.log(message, "DEBUG", "api", null, data),
algorithms: { algorithms: {
serverHostKey: ["ssh-rsa", "ssh-dss", "rsa-sha2-256", "rsa-sha2-512", "ecdsa-sha2-nistp256", "ecdsa-sha2-nistp384"], serverHostKey: [
"ssh-rsa",
"ssh-dss",
"rsa-sha2-256",
"rsa-sha2-512",
"ecdsa-sha2-nistp256",
"ecdsa-sha2-nistp384",
],
}, },
}; };
exports.default = async (req, res) => { exports.default = async (req, res) => {
//Query for the List of Bodyshop Clients. //Query for the List of Bodyshop Clients.
logger.log("kaizen-start", "DEBUG", "api", null, null); logger.log("kaizen-start", "DEBUG", "api", null, null);
const kaizenShopsNames = ["SUMMIT", "STRATHMORE", "SUNRIDGE"]; const kaizenShopsIDs = ["SUMMIT", "STRATHMORE", "SUNRIDGE"];
const { bodyshops } = await client.request(queries.GET_KAIZEN_SHOPS, { const { bodyshops } = await client.request(queries.GET_KAIZEN_SHOPS, {
shopname: kaizenShopsNames, imexshopid: kaizenShopsIDs,
}); });
const specificShopIds = req.body.bodyshopIds; // ['uuid] const specificShopIds = req.body.bodyshopIds; // ['uuid]

View File

@@ -1739,8 +1739,8 @@ exports.GET_ENTEGRAL_SHOPS = `query GET_ENTEGRAL_SHOPS {
} }
}`; }`;
exports.GET_KAIZEN_SHOPS = `query GET_KAIZEN_SHOPS($shopname: [String]) { exports.GET_KAIZEN_SHOPS = `query GET_KAIZEN_SHOPS($imexshopid: [String]) {
bodyshops(where: {shopname: {_in: $shopname}}){ bodyshops(where: {imexshopid: {_in: $imexshopid}}){
id id
shopname shopname
address1 address1