Skip to content

Commit 5004717

Browse files
add groupIds to stats history
1 parent 5fe490c commit 5004717

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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}`);
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)