@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.
@@ -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
@@ -19,7 +19,6 @@ export const objectToArray = (data) => {
19
19
  * @returns {String}
20
20
  */
21
21
  export const getBaseUrl = () => {
22
- console.log("Environment", process.env.REACT_APP_NODE_ENV);
23
22
  switch (process.env.REACT_APP_NODE_ENV) {
24
23
  case "development":
25
24
  case null:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.50",
3
+ "version": "1.1.51",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {