Merge branch 'adiDev' into develop
This commit is contained in:
commit
2c13dae452
3 changed files with 1 additions and 28 deletions
|
|
@ -37,15 +37,6 @@ async function main() {
|
||||||
app.use("/", express.static("static"));
|
app.use("/", express.static("static"));
|
||||||
app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument));
|
app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument));
|
||||||
|
|
||||||
// app.use((req, res, next) => {
|
|
||||||
// console.log(`Request received at: ${req.url}`);
|
|
||||||
// next();
|
|
||||||
// });
|
|
||||||
|
|
||||||
// app.get('/api', (req, res) => {
|
|
||||||
// res.send('API route is working!');
|
|
||||||
// });
|
|
||||||
|
|
||||||
RegisterRoutes(app);
|
RegisterRoutes(app);
|
||||||
|
|
||||||
app.use(error);
|
app.use(error);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ import { Profile } from "../entities/Profile";
|
||||||
import { viewRegistryOfficer } from "../entities/view/viewRegistryOfficer";
|
import { viewRegistryOfficer } from "../entities/view/viewRegistryOfficer";
|
||||||
import { viewRegistryEmployee } from "../entities/view/viewRegistryEmployee";
|
import { viewRegistryEmployee } from "../entities/view/viewRegistryEmployee";
|
||||||
import { EmployeeTempPosMaster } from "../entities/EmployeeTempPosMaster";
|
import { EmployeeTempPosMaster } from "../entities/EmployeeTempPosMaster";
|
||||||
import { sendWebSocket } from "../services/webSocket";
|
|
||||||
|
|
||||||
@Route("api/v1/org/report")
|
@Route("api/v1/org/report")
|
||||||
@Tags("Report")
|
@Tags("Report")
|
||||||
|
|
@ -3538,8 +3537,7 @@ export class ReportController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const metaData = { template: "report2", reportName: "report2", data: { data } };
|
|
||||||
// sendWebSocket(metaData)
|
|
||||||
return new HttpSuccess({ template: "report2", reportName: "report2", data: { data } });
|
return new HttpSuccess({ template: "report2", reportName: "report2", data: { data } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
import { WebSocket } from "ws";
|
|
||||||
import { wss } from "../app";
|
|
||||||
|
|
||||||
export async function sendWebSocket(data:any){
|
|
||||||
wss.clients.forEach((client: any) => {
|
|
||||||
if (client.readyState === WebSocket.OPEN) {
|
|
||||||
const message = JSON.stringify(data);
|
|
||||||
console.log("📤 Sending data to client:", message);
|
|
||||||
client.send(message, (err:any) => {
|
|
||||||
if (err) {
|
|
||||||
console.error("❌ Error sending message:", err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue