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
|
|
120
|
-
console.log("section: is ",
|
|
121
|
-
if (
|
|
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:
|
|
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[
|
|
141
|
+
richContentObject[sectionTitle] = data.richContent.richContent;
|
|
142
142
|
}
|
|
143
143
|
else {
|
|
144
144
|
throw new Error("Error converting html to rich content response: "+response);
|