dms-middleware-auth 1.0.7 → 1.0.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.
@@ -94,7 +94,7 @@ let AuthMiddleware = class AuthMiddleware {
94
94
  const apiPermission = JSON.parse(clientAttributes[req.originalUrl]);
95
95
  if (apiPermission?.params === "true") {
96
96
  const event = req?.body?.event;
97
- const url = req?.originalUrl + `?params=${event}`;
97
+ const url = req?.originalUrl + `?action=${event}`;
98
98
  if (!clientAttributes[url]) {
99
99
  return res.status(403).json({ message: 'Access denied for event' });
100
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dms-middleware-auth",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Reusable middleware for authentication and authorization in NestJS applications.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -69,7 +69,7 @@ export class AuthMiddleware implements NestMiddleware {
69
69
  if (apiPermission?.params === "true")
70
70
  {
71
71
  const event = req?.body?.event;
72
- const url = req?.originalUrl + `?params=${event}`;
72
+ const url = req?.originalUrl + `?action=${event}`;
73
73
  if (!clientAttributes[url]){
74
74
  return res.status(403).json({ message: 'Access denied for event' });
75
75
  }