Merge branch 'adiDev' into develop
This commit is contained in:
commit
205034ab4d
2 changed files with 65 additions and 70 deletions
|
|
@ -31,8 +31,9 @@ import { Profile } from "../entities/Profile";
|
|||
import { viewRegistryOfficer } from "../entities/view/viewRegistryOfficer";
|
||||
import { viewRegistryEmployee } from "../entities/view/viewRegistryEmployee";
|
||||
import { EmployeeTempPosMaster } from "../entities/EmployeeTempPosMaster";
|
||||
// import { WebSocket } from "ws";
|
||||
// import { wss } from "../app";
|
||||
|
||||
import { WebSocket } from "ws";
|
||||
import { wss } from "../app";
|
||||
|
||||
@Route("api/v1/org/report")
|
||||
@Tags("Report")
|
||||
|
|
@ -3565,19 +3566,19 @@ export class ReportController extends Controller {
|
|||
}
|
||||
// console.log(">>",data);
|
||||
|
||||
// wss.clients.forEach((client: any) => {
|
||||
// if (client.readyState === WebSocket.OPEN) {
|
||||
// const message = JSON.stringify({ template: "report2", reportName: "report2", data: { data } });
|
||||
// console.log("📤 Sending data to client:", message);
|
||||
// client.send(message, (err:any) => {
|
||||
// if (err) {
|
||||
// console.error("❌ Error sending message:", err);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
wss.clients.forEach((client: any) => {
|
||||
if (client.readyState === WebSocket.OPEN) {
|
||||
const message = JSON.stringify({ template: "report2", reportName: "report2", data: { data } });
|
||||
console.log("📤 Sending data to client:", message);
|
||||
client.send(message, (err:any) => {
|
||||
if (err) {
|
||||
console.error("❌ Error sending message:", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return new HttpSuccess({ template: "report2", reportName: "report2", data: { data } });
|
||||
// return new HttpSuccess({ template: "report2", reportName: "report2", data: { data } });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue