@urga-panel/ur-panels-core 1.0.22 → 1.0.24

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.
@@ -136,7 +136,7 @@ export class AuthService extends Service {
136
136
  }
137
137
  }
138
138
  async checkToken({ panel_token, options, auth_token }) {
139
- this.log.OK("panel_token Token:", panel_token);
139
+ //this.log.OK("panel_token Token:", panel_token);
140
140
  //debugger;
141
141
  try {
142
142
  // 1. Access token'ı doğrula
@@ -89,7 +89,7 @@ export class RequestHandlerService extends Service {
89
89
  role: handler.options?.role
90
90
  }
91
91
  });
92
- this.log.debug("isAuthenticated", isAuthenticated);
92
+ this.log.debug("isAuthenticated", isAuthenticated.valid, isAuthenticated.user);
93
93
  if (!isAuthenticated.valid) {
94
94
  return this.resposeHandler({ status: "error", message: "Unauthorized" });
95
95
  }
@@ -29,7 +29,9 @@ export class Service {
29
29
  return;
30
30
  }
31
31
  else {
32
- this.log = opts.usedService["LogService"].logSetupForService(this.tag, this.namespace);
32
+ // usedService'ler function olarak geçiriliyor, önce çağırmalıyız
33
+ const logService = opts.usedService["LogService"]();
34
+ this.log = logService.logSetupForService(this.tag, this.namespace);
33
35
  }
34
36
  }
35
37
  getLogPrefix() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urga-panel/ur-panels-core",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -220,7 +220,7 @@ export abstract class AuthService extends Service {
220
220
  },
221
221
  auth_token: string
222
222
  }): Promise<{ valid: boolean; newPanelToken?: string, user?: any }> {
223
- this.log.OK("panel_token Token:", panel_token);
223
+ //this.log.OK("panel_token Token:", panel_token);
224
224
 
225
225
  //debugger;
226
226
  try {
@@ -122,7 +122,7 @@ export class RequestHandlerService extends Service {
122
122
  }
123
123
  },);
124
124
 
125
- this.log.debug("isAuthenticated", isAuthenticated);
125
+ this.log.debug("isAuthenticated", isAuthenticated.valid, isAuthenticated.user);
126
126
 
127
127
  if (!isAuthenticated.valid) {
128
128
  return this.resposeHandler({ status: "error", message: "Unauthorized" });
@@ -58,7 +58,9 @@ export abstract class Service {
58
58
  return;
59
59
  }
60
60
  else {
61
- this.log = (opts.usedService["LogService"] as unknown as any).logSetupForService(this.tag, this.namespace);
61
+ // usedService'ler function olarak geçiriliyor, önce çağırmalıyız
62
+ const logService = opts.usedService["LogService"]() as any;
63
+ this.log = logService.logSetupForService(this.tag, this.namespace);
62
64
  }
63
65
  }
64
66