From a828693d2e83284c097052483de68bdcef98e10b Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Thu, 6 Mar 2025 14:08:22 +0700 Subject: [PATCH] reverse --- src/app.ts | 2 +- src/controllers/ReportController.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app.ts b/src/app.ts index 42d39d9d..ef51cf64 100644 --- a/src/app.ts +++ b/src/app.ts @@ -151,7 +151,7 @@ async function main() { } }); - // ตั้งค่า Express routes + // ตั้งค่า Express routes app.get('/', (req, res) => { res.send('Hello from Express!'); }); diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 8030578d..8e2f2ad4 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -32,8 +32,8 @@ 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") @@ -3542,7 +3542,7 @@ export class ReportController extends Controller { } // console.log(">>",data); - wss.clients.forEach((client: any) => { + // 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); @@ -3552,7 +3552,7 @@ export class ReportController extends Controller { // } // }); // } - }); + // }); return new HttpSuccess({ template: "report2", reportName: "report2", data: { data } }); }