emilsoftware-utilities 1.3.122 → 1.3.123

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,9 +2,11 @@ import { Response } from 'express';
2
2
  import { AccessiOptions } from '../AccessiModule';
3
3
  import { AuthService } from '../Services/AuthService/AuthService';
4
4
  import { LoginRequest } from '../Dtos';
5
+ import { Logger } from '../../Logger';
5
6
  export declare class AuthController {
6
7
  private readonly authService;
7
8
  private readonly options;
9
+ logger: Logger;
8
10
  constructor(authService: AuthService, options: AccessiOptions);
9
11
  resetPassword(res: Response, token: string, newPassword: string): Promise<Response<any, Record<string, any>>>;
10
12
  getUserByToken(token: string, res: Response): Promise<Response<any, Record<string, any>>>;
@@ -62,10 +62,12 @@ const jwt = __importStar(require("jsonwebtoken"));
62
62
  const Utilities_1 = require("../../Utilities");
63
63
  const AuthService_1 = require("../Services/AuthService/AuthService");
64
64
  const Dtos_1 = require("../Dtos");
65
+ const Logger_1 = require("../../Logger");
65
66
  let AuthController = AuthController_1 = class AuthController {
66
67
  constructor(authService, options) {
67
68
  this.authService = authService;
68
69
  this.options = options;
70
+ this.logger = new Logger_1.Logger(AuthController_1.name);
69
71
  }
70
72
  resetPassword(res, token, newPassword) {
71
73
  return __awaiter(this, void 0, void 0, function* () {
@@ -110,6 +112,7 @@ let AuthController = AuthController_1 = class AuthController {
110
112
  return Utilities_1.RestUtilities.sendBaseResponse(res, userData);
111
113
  }
112
114
  catch (error) {
115
+ this.logger.error('Errore durante il login', error);
113
116
  return Utilities_1.RestUtilities.sendInvalidCredentials(res);
114
117
  }
115
118
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emilsoftware-utilities",
3
- "version": "1.3.122",
3
+ "version": "1.3.123",
4
4
  "description": "Utilities for EmilSoftware",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",