@jcbuisson/express-x 1.5.18 → 1.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/context.mjs +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcbuisson/express-x",
3
- "version": "1.5.18",
3
+ "version": "1.5.19",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
package/src/context.mjs CHANGED
@@ -50,8 +50,8 @@ export async function removeConnectionDataItem(context, key) {
50
50
  })
51
51
  }
52
52
 
53
- export function sendEventToClient(context, type, value) {
53
+ export async function sendEventToClient(context, type, value) {
54
54
  const id = context.params.connectionId
55
- const socket = context.app.cnx2Socket
55
+ const socket = context.app.cnx2Socket[id]
56
56
  socket.emit(type, value)
57
57
  }