diff --git a/.gitignore b/.gitignore index b384ed9e..27fb5f91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ __coverage__ .build-info .sass-cache -#dist +dist node_modules _auto_doc_ .vscode diff --git a/package.json b/package.json index 7aa5a149..f2115142 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.13.0", + "version": "0.14.0", "dependencies": { "auth0-js": "^6.8.4", "config": "^3.2.0", diff --git a/src/actions/members.js b/src/actions/members.js index 3167ec8c..1a500cb5 100644 --- a/src/actions/members.js +++ b/src/actions/members.js @@ -187,8 +187,8 @@ async function getStatsHistoryInit(handle, uuid) { * @param {String} tokenV3 v3 auth token. * @return {Action} */ -async function getStatsHistoryDone(handle, uuid, tokenV3) { - const data = await getService(tokenV3).getStatsHistory(handle); +async function getStatsHistoryDone(handle, groupIds, uuid, tokenV3) { + const data = await getService(tokenV3).getStatsHistory(handle, groupIds); return { data, handle, uuid }; } diff --git a/src/services/members.js b/src/services/members.js index c761bdaa..128a61f4 100644 --- a/src/services/members.js +++ b/src/services/members.js @@ -99,8 +99,13 @@ class MembersService { * @param {String} handle * @return {Promise} Resolves to the stats object. */ - async getStatsHistory(handle) { - const res = await this.private.api.get(`/members/${handle}/stats/history`); + async getStatsHistory(handle, groupIds) { + let res; + if (groupIds) { + res = await this.private.api.get(`/members/${handle}/stats/history?groupIds=${groupIds}`); + } else { + res = await this.private.api.get(`/members/${handle}/stats/history`); + } return getApiResponsePayload(res); }