@sendhome/common 1.0.154 → 1.0.155

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.
@@ -2,6 +2,7 @@ import { Request, Response, NextFunction } from 'express';
2
2
  interface UserPayload {
3
3
  id: string;
4
4
  email: string;
5
+ sessionId: string;
5
6
  }
6
7
  declare global {
7
8
  namespace Express {
@@ -2,6 +2,7 @@ import { Request, Response, NextFunction } from 'express';
2
2
  interface UserPayload {
3
3
  id: string;
4
4
  email: string;
5
+ sessionId: string;
5
6
  }
6
7
  declare global {
7
8
  namespace Express {
@@ -2,6 +2,7 @@ import { Request, Response, NextFunction } from 'express';
2
2
  interface UserPayload {
3
3
  id: string;
4
4
  email: string;
5
+ sessionId: string;
5
6
  }
6
7
  declare global {
7
8
  namespace Express {
@@ -29,9 +29,7 @@ const requireAuth = (sessionServiceUrl, deviceInfo) => {
29
29
  // process.env.JWT_KEY!
30
30
  );
31
31
  // Call the session service to validate the session
32
- const response = yield axios_1.default.get(`${sessionServiceUrl}/${payload.id}`, {
33
- params: { device_info: deviceInfo }, // Send the device info for validation
34
- });
32
+ const response = yield axios_1.default.get(`${sessionServiceUrl}/${payload.sessionId}`);
35
33
  if (response.status !== 200) {
36
34
  res.status(401).json({ message: 'Invalid or expired session' });
37
35
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendhome/common",
3
- "version": "1.0.154",
3
+ "version": "1.0.155",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",