@veritree/services 2.5.5 → 2.5.8

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.5.5",
3
+ "version": "2.5.8",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -8,8 +8,8 @@ class OrgsApi extends Api {
8
8
  this.resource = "orgs";
9
9
  }
10
10
 
11
- users() {
12
- const { orgId } = getSession();
11
+ users(orgIdAs) {
12
+ const orgId = orgIdAs ? orgIdAs : getSession().orgId;
13
13
  return Team(this, orgId);
14
14
  }
15
15
 
@@ -174,6 +174,9 @@ export default class Api {
174
174
  if(isOrgAs) {
175
175
  orgIdParam = `org_id=${args.org_id_as}`;
176
176
  orgTypeParam = `&org_type=${args.org_type_as}`;
177
+
178
+ delete args.org_id_as;
179
+ delete args.org_type_as;
177
180
  }
178
181
 
179
182
  if (!isOrgLess && !isOrgAs) {
@@ -29,8 +29,8 @@ const Team = (api, id) => {
29
29
  return await api.post(url, data, 'patch');
30
30
  }
31
31
 
32
- const remove = async (userId) => {
33
- url = `${url}/${userId}${api.getUrlParams()}`;
32
+ const remove = async (userId, args) => {
33
+ url = `${url}/${userId}${api.getUrlParams(args)}`;
34
34
  return await api.post(url, null, "delete");
35
35
  }
36
36