@obisey/nest 0.1.40 → 0.1.41
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
|
@@ -52,8 +52,7 @@ function BaseService(modelo) {
|
|
|
52
52
|
// }
|
|
53
53
|
let nkey = `${key.universo ? key.universo : 'pro'}:${key.IdEmpresa}:${key.fragmentos[0].nombre}:${id}`;
|
|
54
54
|
const { resultado, cache } = await (0, cachear_1.cachear)(cacheable, this.cacheManager, (0, keyInterface_1.transformarKey)({ ...key }), (cache) => {
|
|
55
|
-
|
|
56
|
-
return Promise.resolve(ModelClass.build(JSON.parse(cache), { raw: false, isNewRecord: false }));
|
|
55
|
+
return Promise.resolve(repository.build(JSON.parse(cache), { raw: false, isNewRecord: false }));
|
|
57
56
|
}, (resultado) => {
|
|
58
57
|
return Promise.resolve(resultado
|
|
59
58
|
? JSON.stringify(resultado.get({ plain: true }))
|
|
@@ -126,8 +125,7 @@ function BaseService(modelo) {
|
|
|
126
125
|
where,
|
|
127
126
|
}), (cache) => Promise.resolve(cache.map((n) => {
|
|
128
127
|
const parsed = JSON.parse(n);
|
|
129
|
-
|
|
130
|
-
return ModelClass.build(parsed, { raw: false, isNewRecord: false });
|
|
128
|
+
return repository.build(parsed, { raw: false, isNewRecord: false });
|
|
131
129
|
})), (resultado) => {
|
|
132
130
|
return Promise.resolve(resultado.map((n) => JSON.stringify(n.get({ plain: true }))));
|
|
133
131
|
}, () => repository.findAll(value), () => new Promise(async (resolve) => {
|