shuttlepro-shared 1.2.7 → 1.2.8
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.
|
@@ -109,10 +109,6 @@ const createConfig = (env) => ({
|
|
|
109
109
|
},
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
const constructQuery = R.curry((baseQuery, additionalQuery) =>
|
|
113
|
-
R.mergeDeepRight(baseQuery, additionalQuery)
|
|
114
|
-
);
|
|
115
|
-
|
|
116
112
|
const createLabelRepository = (dependencies) => {
|
|
117
113
|
const { Label, redisConfig } = dependencies;
|
|
118
114
|
|
|
@@ -178,23 +174,21 @@ const createLabelRepository = (dependencies) => {
|
|
|
178
174
|
R.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt), labels)
|
|
179
175
|
);
|
|
180
176
|
|
|
181
|
-
const cachedFind = withCache(
|
|
177
|
+
const cachedFind = await withCache(
|
|
182
178
|
generateCacheKey(query),
|
|
183
179
|
() => Label.find(query).exec(),
|
|
184
180
|
false
|
|
185
181
|
);
|
|
186
182
|
|
|
187
|
-
return executeQuery(
|
|
183
|
+
return executeQuery(cachedFind);
|
|
188
184
|
});
|
|
189
185
|
|
|
190
186
|
const findAllLabels = R.curry(async (query = {}) => {
|
|
191
|
-
|
|
187
|
+
return await withCache(
|
|
192
188
|
generateCacheKey(query),
|
|
193
189
|
() => Label.find(query).exec(),
|
|
194
190
|
false
|
|
195
191
|
);
|
|
196
|
-
|
|
197
|
-
return cachedFind;
|
|
198
192
|
});
|
|
199
193
|
|
|
200
194
|
const updateLabel = R.curry(async (labelId, updateData) => {
|