@roit/roit-data-firestore 0.0.45 → 0.0.46-alpha
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
CHANGED
|
@@ -13,8 +13,19 @@
|
|
|
13
13
|
console.log('It was decreed that it is being executed try, no operation or effective transaction will be performed')
|
|
14
14
|
return []
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
const getParameters = (...paramValue) => {
|
|
18
|
+
return paramValue.map(item => {
|
|
19
|
+
if (typeof item === 'object' && item !== null) {
|
|
20
|
+
return JSON.stringify(item)
|
|
21
|
+
}
|
|
22
|
+
return item
|
|
23
|
+
}).filter(item => Boolean(item))
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const rawParameters = getParameters(<params_replace>)
|
|
16
27
|
|
|
17
|
-
const result = await cacheResolver.getCacheResult(repositoryClassName, methodSignature,
|
|
28
|
+
const result = await cacheResolver.getCacheResult(repositoryClassName, methodSignature, rawParameters)
|
|
18
29
|
|
|
19
30
|
if(result) {
|
|
20
31
|
return result
|
|
@@ -35,13 +46,13 @@
|
|
|
35
46
|
items.push(element)
|
|
36
47
|
})
|
|
37
48
|
|
|
38
|
-
await cacheResolver.cacheResult(repositoryClassName, methodSignature, items,
|
|
49
|
+
await cacheResolver.cacheResult(repositoryClassName, methodSignature, items, rawParameters)
|
|
39
50
|
|
|
40
51
|
await firestoreReadAuditResolver.persistFirestoreRead({
|
|
41
52
|
collection: '<collection_name_replace>',
|
|
42
53
|
repositoryClassName: repositoryClassName,
|
|
43
54
|
functionSignature: methodSignature,
|
|
44
|
-
params:
|
|
55
|
+
params: rawParameters,
|
|
45
56
|
queryResult: items
|
|
46
57
|
})
|
|
47
58
|
|