@stackfactor/client-api 1.1.50 → 1.1.51
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/lib/learningContent.js +35 -0
- package/lib/utils.js +0 -1
- package/package.json +1 -1
package/lib/learningContent.js
CHANGED
|
@@ -265,6 +265,40 @@ export const setLearningContentInformation = (id, data, token) => {
|
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
267
|
|
|
268
|
+
/**
|
|
269
|
+
* Set partial content information
|
|
270
|
+
* @param {*} id
|
|
271
|
+
* @param {*} data
|
|
272
|
+
* @param {*} token
|
|
273
|
+
* @returns
|
|
274
|
+
*/
|
|
275
|
+
export const setLearningContentPartialContentInformation = (
|
|
276
|
+
id,
|
|
277
|
+
data,
|
|
278
|
+
token
|
|
279
|
+
) => {
|
|
280
|
+
return new Promise(function (resolve, reject) {
|
|
281
|
+
const requestData = {
|
|
282
|
+
data: data,
|
|
283
|
+
id: id,
|
|
284
|
+
};
|
|
285
|
+
let confirmationRequest = client.post(
|
|
286
|
+
`api/v1/learningcontent/updatepartialcontent/${id}`,
|
|
287
|
+
requestData,
|
|
288
|
+
{
|
|
289
|
+
headers: { authorization: token },
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
confirmationRequest
|
|
293
|
+
.then((response) => {
|
|
294
|
+
resolve(response.data);
|
|
295
|
+
})
|
|
296
|
+
.catch((error) => {
|
|
297
|
+
reject(error);
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
};
|
|
301
|
+
|
|
268
302
|
/**
|
|
269
303
|
* Set the content for a specific learning activity
|
|
270
304
|
* @param {String} id
|
|
@@ -402,6 +436,7 @@ export default {
|
|
|
402
436
|
generateMicroSkillTestKnowledge,
|
|
403
437
|
getLearningContentList,
|
|
404
438
|
publishLearningContent,
|
|
439
|
+
setLearningContentPartialContentInformation,
|
|
405
440
|
setLearningContentLearningContentInformation,
|
|
406
441
|
setLearningContentLearningMicroSkillContentInformation,
|
|
407
442
|
setLearningContentInformation,
|
package/lib/utils.js
CHANGED