sr-npm 1.7.1070 → 1.7.1071

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.
@@ -116,11 +116,11 @@ async function fetchJobDescription(jobId,testObject=undefined) {
116
116
  async function htmlRichContentConverter(sections) {
117
117
  console.log("sections: are ",sections);
118
118
  const richContentObject = {}
119
- for (const section of sections) {
120
- console.log("section: is ",section);
121
- if (section.text) {
119
+ for (const [sectionTitle, sectionData] of Object.entries(sections)) {
120
+ console.log("section: is ",sectionTitle);
121
+ if (sectionData.text) {
122
122
  const raw = JSON.stringify({
123
- content: section.text,
123
+ content: sectionData.text,
124
124
  });
125
125
  const requestOptions = {
126
126
  method: 'post',
@@ -138,7 +138,7 @@ async function htmlRichContentConverter(sections) {
138
138
  if (response.ok) {
139
139
  const data = await response.json();
140
140
  console.log("response is ok")
141
- richContentObject[section.title] = data.richContent.richContent;
141
+ richContentObject[sectionTitle] = data.richContent.richContent;
142
142
  }
143
143
  else {
144
144
  throw new Error("Error converting html to rich content response: "+response);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.1070",
3
+ "version": "1.7.1071",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {