Skip to content

Commit d277801

Browse files
authored
Merge pull request topcoder-platform#149 from topcoder-platform/develop
Feature stats history release
2 parents e201446 + ea288ed commit d277801

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__coverage__
22
.build-info
33
.sass-cache
4-
#dist
4+
dist
55
node_modules
66
_auto_doc_
77
.vscode

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
3232
"test": "npm run lint && npm run jest"
3333
},
34-
"version": "0.13.0",
34+
"version": "0.14.0",
3535
"dependencies": {
3636
"auth0-js": "^6.8.4",
3737
"config": "^3.2.0",

src/actions/members.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ async function getStatsHistoryInit(handle, uuid) {
187187
* @param {String} tokenV3 v3 auth token.
188188
* @return {Action}
189189
*/
190-
async function getStatsHistoryDone(handle, uuid, tokenV3) {
191-
const data = await getService(tokenV3).getStatsHistory(handle);
190+
async function getStatsHistoryDone(handle, groupIds, uuid, tokenV3) {
191+
const data = await getService(tokenV3).getStatsHistory(handle, groupIds);
192192
return { data, handle, uuid };
193193
}
194194

src/services/members.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,13 @@ class MembersService {
9999
* @param {String} handle
100100
* @return {Promise} Resolves to the stats object.
101101
*/
102-
async getStatsHistory(handle) {
103-
const res = await this.private.api.get(`/members/${handle}/stats/history`);
102+
async getStatsHistory(handle, groupIds) {
103+
let res;
104+
if (groupIds) {
105+
res = await this.private.api.get(`/members/${handle}/stats/history?groupIds=${groupIds}`);
106+
} else {
107+
res = await this.private.api.get(`/members/${handle}/stats/history`);
108+
}
104109
return getApiResponsePayload(res);
105110
}
106111

0 commit comments

Comments
 (0)
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