sr-npm 1.7.201 → 1.7.202

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/utils.js CHANGED
@@ -12,8 +12,8 @@ async function delay(ms) {
12
12
  function countJobsPerGivenField(jobs, field,jobsPerField) {
13
13
  for (const job of jobs) {
14
14
  if (!job[field]) {
15
- //throw new Error(`Job ${job._id} has no ${field} field`);
16
- //skip for now
15
+ console.warn(`Job ${job._id} missing required field '${field}' - continue`);
16
+ continue;
17
17
  }
18
18
  else{
19
19
  jobsPerField[job[field]] = (jobsPerField[job[field]] || 0) + 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.201",
3
+ "version": "1.7.202",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,11 +17,13 @@ const {
17
17
  let queryKeyWordVar;
18
18
  let queryDepartmentVar;
19
19
  let queryLocationVar;
20
- async function careersPageOnReady(_$w,thisObject,querypage,querykeyWord,querydepartment,querylocation) {
21
- queryPageVar=querypage;
22
- queryKeyWordVar=querykeyWord;
23
- queryDepartmentVar=querydepartment;
24
- queryLocationVar=querylocation;
20
+ async function careersPageOnReady(_$w,thisObject,queryParams) {
21
+ console.log("queryParams: ", queryParams);
22
+ const { page, keyWord, department, location } = queryParams;
23
+ queryPageVar=page;
24
+ queryKeyWordVar=keyWord;
25
+ queryDepartmentVar=department;
26
+ queryLocationVar=location;
25
27
  thisObjectVar=thisObject;
26
28
  allJobs=await getAllPositions();
27
29
  await handleUrlParams(_$w);