mirror of
https://github.com/fergalmoran/dss-realtime.git
synced 2025-12-22 09:38:06 +00:00
Post full json to notification
This commit is contained in:
@@ -83,7 +83,7 @@ app.get("/", function (req, res) {
|
||||
app.post("/notification", function (req, res) {
|
||||
if (sessions[req.body.sessionid]) {
|
||||
console.log("Data is: " + req.body.message);
|
||||
clients[sessions[req.body.sessionid]].emit('notification', {message: req.body.message});
|
||||
clients[sessions[req.body.sessionid]].emit('notification', req.body);
|
||||
res.send(req.body);
|
||||
}else{
|
||||
console.log("Session with key " + req.body.sessionid + "not found");
|
||||
|
||||
Reference in New Issue
Block a user