@wrcb/cb-common 1.0.212 → 1.0.214

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.
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.requireAuth = void 0;
4
4
  const notAuthorizedError_1 = require("../errors/notAuthorizedError");
5
5
  const requireAuth = (req, res, next) => {
6
- console.log('Headers:', req.headers);
7
- console.log('Cookies:', req.headers.cookie);
8
- console.log('re1:', req);
6
+ console.log('📢 Middleware requireAuth chamado:-------------------------------------');
7
+ console.log('➡️ Método:', req.method);
8
+ console.log('➡️ URL:', req.originalUrl); // mostra o caminho completo da rota
9
+ console.log('➡️ Headers:', req.headers);
10
+ console.log('➡️ Cookies:', req.headers.cookie);
9
11
  if (!req.currentUser) {
10
12
  throw new notAuthorizedError_1.NotAuthorizedError('NotAuthorized');
11
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.212",
3
+ "version": "1.0.214",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",