sr-npm 1.7.30 → 1.7.32
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/backend/collectionConsts.js +1 -0
- package/backend/data.js +1 -1
- package/backend/queries.js +4 -9
- package/package.json +1 -1
package/backend/data.js
CHANGED
|
@@ -198,6 +198,7 @@ async function aggregateJobsByFieldToCMS({ field, collection }) {
|
|
|
198
198
|
value = normalizeCityName(value);
|
|
199
199
|
|
|
200
200
|
return {
|
|
201
|
+
title: value,
|
|
201
202
|
_id: value.replace(/\s+/g, ''),
|
|
202
203
|
count: amount,
|
|
203
204
|
locationAddress: locAddress,
|
|
@@ -313,7 +314,6 @@ function fetchJobLocation(jobDetails) {
|
|
|
313
314
|
}
|
|
314
315
|
|
|
315
316
|
|
|
316
|
-
|
|
317
317
|
function getSmartToken() {
|
|
318
318
|
const elevatedGetSecretValue = auth.elevate(secrets.getSecretValue);
|
|
319
319
|
return elevatedGetSecretValue("x-smarttoken")
|
package/backend/queries.js
CHANGED
|
@@ -2,19 +2,14 @@ const { COLLECTIONS } = require('./consts');
|
|
|
2
2
|
const { items } = require('@wix/data');
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
async function getAllPositions() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return results.items;
|
|
10
|
-
|
|
6
|
+
return await items.query(COLLECTIONS.JOBS).find().items;
|
|
7
|
+
|
|
11
8
|
}
|
|
12
9
|
|
|
13
10
|
async function getPositionsByField(field, value) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const results = await query.find();
|
|
17
|
-
return results.items;
|
|
11
|
+
return await items.query(COLLECTIONS.JOBS).where(field, value).find().items;
|
|
12
|
+
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
|