@stackfactor/client-api 1.1.10 → 1.1.11
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 +41 -8
- package/package.json +1 -1
package/lib/learningContent.js
CHANGED
|
@@ -240,26 +240,58 @@ export const setLearningContentInformation = (id, data, token) => {
|
|
|
240
240
|
/**
|
|
241
241
|
* Set the content for a specific learning activity
|
|
242
242
|
* @param {String} id
|
|
243
|
-
* @param {String}
|
|
244
|
-
* @param {String} operation
|
|
243
|
+
* @param {String} learningcontentid
|
|
245
244
|
* @param {Object} data
|
|
246
245
|
* @param {String} token
|
|
247
246
|
* @returns {Promise<String>} OK word if the operation was succesful
|
|
248
247
|
*/
|
|
249
|
-
export const
|
|
248
|
+
export const setLearningContentLearningContentInformation = (
|
|
250
249
|
id,
|
|
251
|
-
|
|
252
|
-
operation,
|
|
250
|
+
learningcontentid,
|
|
253
251
|
data,
|
|
254
252
|
token
|
|
255
253
|
) => {
|
|
256
254
|
return new Promise(function (resolve, reject) {
|
|
257
255
|
const requestData = {
|
|
258
256
|
data: data,
|
|
259
|
-
operation: operation,
|
|
260
257
|
};
|
|
261
258
|
let confirmationRequest = client.post(
|
|
262
|
-
`api/v1/learningcontent/
|
|
259
|
+
`api/v1/learningcontent/updatelearningcontent/${id}/${learningcontentid}`,
|
|
260
|
+
requestData,
|
|
261
|
+
{
|
|
262
|
+
headers: { authorization: token },
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
confirmationRequest
|
|
266
|
+
.then((response) => {
|
|
267
|
+
resolve(response.data);
|
|
268
|
+
})
|
|
269
|
+
.catch((error) => {
|
|
270
|
+
reject(error);
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Set all the learning content for a specific micro skill
|
|
277
|
+
* @param {String} id
|
|
278
|
+
* @param {String} microskillid
|
|
279
|
+
* @param {Object} data
|
|
280
|
+
* @param {String} token
|
|
281
|
+
* @returns {Promise<String>} OK word if the operation was succesful
|
|
282
|
+
*/
|
|
283
|
+
export const setMicroSkillLearningContentInformation = (
|
|
284
|
+
id,
|
|
285
|
+
microskillid,
|
|
286
|
+
data,
|
|
287
|
+
token
|
|
288
|
+
) => {
|
|
289
|
+
return new Promise(function (resolve, reject) {
|
|
290
|
+
const requestData = {
|
|
291
|
+
data: data,
|
|
292
|
+
};
|
|
293
|
+
let confirmationRequest = client.post(
|
|
294
|
+
`api/v1/learningcontent/updatemicroskilllearningcontent/${id}/${microskillid}`,
|
|
263
295
|
requestData,
|
|
264
296
|
{
|
|
265
297
|
headers: { authorization: token },
|
|
@@ -341,7 +373,8 @@ const learningContent = {
|
|
|
341
373
|
generateLearningActivityContent,
|
|
342
374
|
getLearningContentList,
|
|
343
375
|
publishLearningContent,
|
|
344
|
-
|
|
376
|
+
setLearningContentLearningContentInformation,
|
|
377
|
+
setMicroSkillLearningContentInformation,
|
|
345
378
|
setLearningContentInformation,
|
|
346
379
|
setLearningContentTags,
|
|
347
380
|
watchLearningContent,
|