@jcbuisson/express-x 1.5.7 → 1.5.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcbuisson/express-x",
3
- "version": "1.5.7",
3
+ "version": "1.5.8",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
package/src/context.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
- export async function getConnectionIP(context) {
2
+ export async function getConnection(context) {
3
3
  const id = context.params.connectionId
4
4
  const connection = await context.app.service('Connection')._findUnique({ where: { id }})
5
- return connection?.clientIP
5
+ return connection
6
6
  }
7
7
 
8
8
  export async function resetConnectionIP(context) {
package/src/index.mjs CHANGED
@@ -1,17 +1,16 @@
1
1
 
2
2
  import { expressX } from './server.mjs'
3
3
  import { hashPassword, protect, isAuthenticated } from './common-hooks.mjs'
4
- import { getConnectionIP, resetConnectionIP, getConnectionDataItem, setConnectionDataItem, removeConnectionDataItem, resetConnectionData } from './context.mjs'
4
+ import { getConnection, resetConnectionIP, getConnectionDataItem, setConnectionDataItem, removeConnectionDataItem, resetConnectionData } from './context.mjs'
5
5
  import { resetConnectionChannels } from './channels.mjs'
6
6
 
7
7
  export {
8
8
  expressX,
9
9
 
10
- getConnectionIP,
10
+ getConnection,
11
11
  resetConnectionIP,
12
-
13
12
  resetConnectionChannels,
14
-
13
+
15
14
  getConnectionDataItem,
16
15
  setConnectionDataItem,
17
16
  removeConnectionDataItem,