xcally-nest-library 0.0.37-XM3778-1765535159 → 0.0.37-XM3778-1765792864
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/dist/src/core/application/cached.service.js +1 -2
- package/dist/src/core/application/cached.service.js.map +1 -1
- package/dist/src/core/infrastracture/databases/base.mongo.repository.js +3 -0
- package/dist/src/core/infrastracture/databases/base.mongo.repository.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/core/application/cached.service.ts +1 -2
- package/src/core/infrastracture/databases/base.mongo.repository.ts +4 -0
package/package.json
CHANGED
|
@@ -58,8 +58,7 @@ export class CachedService {
|
|
|
58
58
|
const result = await fn();
|
|
59
59
|
|
|
60
60
|
// Store in cache
|
|
61
|
-
|
|
62
|
-
this.logger.debug(`Cached result for key: ${key} - Set status: ${cacheSetResult !== undefined}`);
|
|
61
|
+
await this.cacheManager.set(key, JSON.stringify(result));
|
|
63
62
|
|
|
64
63
|
return result;
|
|
65
64
|
} catch (error) {
|
|
@@ -206,6 +206,10 @@ export class BaseMongoRepository<E extends ObjectLiteral>
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
// final filtering conditions
|
|
209
|
+
if (andGroup.length === 0) {
|
|
210
|
+
return {};
|
|
211
|
+
}
|
|
212
|
+
|
|
209
213
|
const finalFilter = andGroup.length === 1 ? andGroup[0] : { $and: andGroup };
|
|
210
214
|
|
|
211
215
|
//console.log('Final MongoDB filter:', JSON.stringify(finalFilter, null, 2));
|