ack role, ws syntax, console

This commit is contained in:
Ubuntu 2025-08-04 09:43:09 +05:30
parent 229ee19949
commit 58c10e5ea7
2 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ const sender_port = process.env.SENDER_PORT;
const sender_security = process.env.SENDER_SECURITY;
const path = require('path')
const { emitEvent } = require("../services/secondaryWebsocket");
// const { emitEvent } = require("../services/secondaryWebsocket");
console.log('sender port : ', sender_port);
console.log('sender security : ', sender_security);
@ -390,10 +390,10 @@ exports.signup = async (req, res) => {
);
// ✅ Notify hospitals in the SECONDARY WebSocket instance
emitEvent("new_user", {
message: `A new user has been created for hospital ${hospital_code}.`,
user: { id: userId, username, email, hospital_code: hospital_code },
});
// emitEvent("new_user", {
// message: `A new user has been created for hospital ${hospital_code}.`,
// user: { id: userId, username, email, hospital_code: hospital_code },
// });
res.status(201).json({
message: "User signed up and ID photo uploaded successfully!",

View File

@ -500,4 +500,4 @@ server.listen(40520, () => {
console.log("📡 Secure WebSocket server listening on wss://backend.spurrinai.com:40520");
});
module.exports = { wss, emitEvent };
module.exports = { wss };