@veritree/services 2.40.0 → 2.41.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/services",
3
- "version": "2.40.0",
3
+ "version": "2.41.1",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,10 +1,10 @@
1
- import Api from "../helpers/api";
2
- import { createParamsStringFromArgs } from "../utils/args";
1
+ import Api from '../helpers/api';
2
+ import { createParamsStringFromArgs } from '../utils/args';
3
3
 
4
4
  class StandardsApi extends Api {
5
5
  constructor(resource) {
6
6
  super(resource);
7
- this.resource = "standards";
7
+ this.resource = 'standards';
8
8
  }
9
9
 
10
10
  themes() {
@@ -29,14 +29,14 @@ class StandardsApi extends Api {
29
29
  const url = `${this.getUrl()}/themes/${themeId}?${createParamsStringFromArgs(
30
30
  args
31
31
  )}`;
32
- return await this.post(url, data, "patch");
32
+ return await this.post(url, data, 'patch');
33
33
  };
34
34
 
35
- const remove = async (args) => {
35
+ const remove = async (themeId, args) => {
36
36
  const url = `${this.getUrl()}/themes/${themeId}?${createParamsStringFromArgs(
37
37
  args
38
38
  )}`;
39
- return await this.post(url, data, "delete");
39
+ return await this.post(url, null, 'delete');
40
40
  };
41
41
 
42
42
  const goals = (themeId) => {
@@ -95,12 +95,12 @@ class StandardsApi extends Api {
95
95
 
96
96
  const update = async (data) => {
97
97
  const url = `${this.getUrl()}/goals/${goalId}`;
98
- return await this.post(url, data, "patch");
98
+ return await this.post(url, data, 'patch');
99
99
  };
100
100
 
101
101
  const remove = async () => {
102
102
  const url = `${this.getUrl()}/goals/${goalId}`;
103
- return await this.post(url, null, "delete");
103
+ return await this.post(url, null, 'delete');
104
104
  };
105
105
 
106
106
  return {
@@ -118,12 +118,12 @@ class StandardsApi extends Api {
118
118
 
119
119
  const update = async (data) => {
120
120
  const url = `${this.getUrl()}/indicators/${indicatorId}`;
121
- return await this.post(url, data, "patch");
121
+ return await this.post(url, data, 'patch');
122
122
  };
123
123
 
124
124
  const remove = async () => {
125
125
  const url = `${this.getUrl()}/indicators/${indicatorId}`;
126
- return await this.post(url, null, "delete");
126
+ return await this.post(url, null, 'delete');
127
127
  };
128
128
 
129
129
  return {