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.
package/dist/auth.middleware.js
CHANGED
|
@@ -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 + `?
|
|
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
package/src/auth.middleware.ts
CHANGED
|
@@ -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 + `?
|
|
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
|
}
|