@urga-panel/ur-panels-core 1.0.24 → 1.0.26
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.
|
@@ -89,9 +89,8 @@ export class RequestHandlerService extends Service {
|
|
|
89
89
|
role: handler.options?.role
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
this.log.debug("isAuthenticated", isAuthenticated.valid, isAuthenticated.user);
|
|
92
|
+
this.log.debug("isAuthenticated", isAuthenticated.valid, isAuthenticated.user?.id, isAuthenticated.username);
|
|
93
93
|
if (!isAuthenticated.valid) {
|
|
94
|
-
return this.resposeHandler({ status: "error", message: "Unauthorized" });
|
|
95
94
|
}
|
|
96
95
|
user = isAuthenticated.user || null;
|
|
97
96
|
if (isAuthenticated.newAccessToken) {
|
package/dist/types/Service.js
CHANGED
|
@@ -29,8 +29,11 @@ export class Service {
|
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
//
|
|
33
|
-
const
|
|
32
|
+
// Backend: function olarak geçiriliyor, Frontend: direkt obje
|
|
33
|
+
const logServiceOrFn = opts.usedService["LogService"];
|
|
34
|
+
const logService = typeof logServiceOrFn === 'function'
|
|
35
|
+
? logServiceOrFn()
|
|
36
|
+
: logServiceOrFn;
|
|
34
37
|
this.log = logService.logSetupForService(this.tag, this.namespace);
|
|
35
38
|
}
|
|
36
39
|
}
|
package/package.json
CHANGED
|
@@ -122,10 +122,9 @@ export class RequestHandlerService extends Service {
|
|
|
122
122
|
}
|
|
123
123
|
},);
|
|
124
124
|
|
|
125
|
-
this.log.debug("isAuthenticated", isAuthenticated.valid, isAuthenticated.user);
|
|
125
|
+
this.log.debug("isAuthenticated", isAuthenticated.valid, isAuthenticated.user?.id, isAuthenticated.username);
|
|
126
126
|
|
|
127
127
|
if (!isAuthenticated.valid) {
|
|
128
|
-
return this.resposeHandler({ status: "error", message: "Unauthorized" });
|
|
129
128
|
}
|
|
130
129
|
user = isAuthenticated.user || null;
|
|
131
130
|
|
package/src/types/Service.ts
CHANGED
|
@@ -58,9 +58,12 @@ export abstract class Service {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
|
-
//
|
|
62
|
-
const
|
|
63
|
-
|
|
61
|
+
// Backend: function olarak geçiriliyor, Frontend: direkt obje
|
|
62
|
+
const logServiceOrFn = opts.usedService["LogService"];
|
|
63
|
+
const logService = typeof logServiceOrFn === 'function'
|
|
64
|
+
? logServiceOrFn()
|
|
65
|
+
: logServiceOrFn;
|
|
66
|
+
this.log = (logService as any).logSetupForService(this.tag, this.namespace);
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
|