diff --git a/.circleci/config.yml b/.circleci/config.yml index 09ec1a46..2bf4f64f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: - attach_workspace: at: . - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - - run: npm publish --tag=stable-v0.7.11 + - run: npm publish workflows: version: 2 @@ -45,4 +45,4 @@ workflows: tags: only: /v[0-9]+(\.[0-9]+)*(-[0-9]+)?/ requires: - - test \ No newline at end of file + - test diff --git a/package-lock.json b/package-lock.json index 0a6cb4ce..1d6c931f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "topcoder-react-lib", - "version": "0.7.11-8", + "version": "0.7.11-15", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b6458588..8fc4363f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .", "test": "npm run lint && npm run jest" }, - "version": "0.7.11-14", + "version": "0.7.11-15", "dependencies": { "auth0-js": "^6.8.4", "config": "^3.2.0", diff --git a/src/services/groups.js b/src/services/groups.js index a5ddc2a7..0dc4d8e3 100644 --- a/src/services/groups.js +++ b/src/services/groups.js @@ -139,10 +139,11 @@ export function checkUserGroups(groupIds, userGroups, knownGroups) { */ function handleApiResponse(response) { if (!response.ok) throw new Error(response.statusText); - return response.json().then(({ result }) => { - if (result.status !== 200) throw new Error(result.content); - return result.content; - }); + return response.json(); + // return response.json().then(({ result }) => { + // return result; + // if (result.status !== 200) throw new Error(result.content); + // }); } /** @@ -193,7 +194,7 @@ class GroupService { constructor(tokenV3) { const now = Date.now(); this.private = { - api: getApi('V3', tokenV3), + api: getApi('V5', tokenV3), cache: { groupTreeIds: { lastCleanUp: now, @@ -341,9 +342,9 @@ class GroupService { if (withSubGroups) url += '?includeSubGroups=true'; let res = await this.private.api.get(url); if (!res.ok) throw new Error(res.statusText); - res = (await res.json()).result; - if (!res.success) throw new Error(res.content); - return Number(res.content); + res = (await res.json()); + // if (!res.success) throw new Error(res.content); + return Number(res.count); } /** pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy