Merge branch 'feature/cdk' into feature/2021-08-13

This commit is contained in:
Patrick Fic
2021-08-10 13:58:58 -07:00
6 changed files with 620 additions and 50 deletions

View File

@@ -1,5 +1,4 @@
const path = require("path");
const _ = require("lodash");
require("dotenv").config({
path: path.resolve(
process.cwd(),
@@ -51,6 +50,15 @@ io.on("connection", (socket) => {
socket.on("cdk-export-job", (jobid) => {
CdkJobExport(socket, jobid);
});
socket.on("cdk-selected-customer", (selectedCustomerId) => {
createLogEvent(
socket,
"DEBUG",
`User selected customer ID ${selectedCustomerId}`
);
socket.selectedCustomerId = selectedCustomerId;
//CdkJobExport(socket, jobid);
});
socket.on("disconnect", () => {
createLogEvent(socket, "DEBUG", `User disconnected.`);
@@ -81,6 +89,9 @@ function createLogEvent(socket, level, message) {
message,
});
}
// if (level === "ERROR") {
// throw new Error(message);
// }
}
}