propro-utils 1.7.44 → 1.7.46
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/package.json +1 -1
- package/src/index.js +19 -5
- package/utils/serviceManager.js +1 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -100,11 +100,25 @@ class ProProAuthMiddleware {
|
|
|
100
100
|
this.redisClient
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
|
|
104
|
+
console.log("SERVER AUTH INITIALIZED", {
|
|
105
|
+
userSchema: this.userSchema,
|
|
106
|
+
userStyleSchema: this.userStyleSchema,
|
|
107
|
+
folderSchema: this.folderSchema,
|
|
108
|
+
themeSchema: this.themeSchema,
|
|
109
|
+
redisClient: this.redisClient
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
if (!!this?.userSchema) ServiceManager.registerService('UserSchema', this.userSchema);
|
|
113
|
+
|
|
114
|
+
if (!!this?.userStyleSchema) ServiceManager.registerService('UserStyleSchema', this.userStyleSchema);
|
|
115
|
+
|
|
116
|
+
if (!!this?.redisClient) ServiceManager.registerService('RedisClient', this.redisClient);
|
|
117
|
+
|
|
118
|
+
if (!!this?.folderSchema) ServiceManager.registerService('FolderSchema', this.folderSchema);
|
|
119
|
+
|
|
120
|
+
if (!!this?.themeSchema) ServiceManager.registerService('ThemeSchema', this.themeSchema);
|
|
121
|
+
|
|
108
122
|
return this.serverAuth.middleware();
|
|
109
123
|
}
|
|
110
124
|
|
package/utils/serviceManager.js
CHANGED
|
@@ -31,7 +31,7 @@ class ServiceManager {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
getService(name) {
|
|
34
|
-
console.log("GET SERVICE ", {name, service: this.services[name], servicePromise: this.servicePromises[name]});
|
|
34
|
+
// console.log("GET SERVICE ", {name, service: this.services[name], servicePromise: this.servicePromises[name]});
|
|
35
35
|
|
|
36
36
|
if (this.services[name]) {
|
|
37
37
|
return this.services[name];
|