Skip to content

Commit e713264

Browse files
committed
feature: /members/stats v5 upgade
* use v5 /stats and /stats/history * load memberGroups to speed up site redirection
1 parent 51d96a6 commit e713264

File tree

14 files changed

+4136
-4047
lines changed

14 files changed

+4136
-4047
lines changed

__tests__/__snapshots__/index.js.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ exports[`Library interface test 1`] = `
44
Object {
55
"actions": Object {
66
"auth": Object {
7+
"getMemberGroups": [Function],
78
"loadProfile": [Function],
89
"setTcTokenV2": [Function],
910
"setTcTokenV3": [Function],
@@ -53,7 +54,6 @@ Object {
5354
"dropGroups": [Function],
5455
"getGroupsDone": [Function],
5556
"getGroupsInit": [Function],
56-
"getMemberGroups": [Function],
5757
},
5858
"looker": Object {
5959
"getLookerDone": [Function],
@@ -404,6 +404,7 @@ Object {
404404
},
405405
"getApiResponsePayload": [Function],
406406
"getLookerApiResponsePayload": [Function],
407+
"handleApiResponse": [Function],
407408
},
408409
"time": Object {
409410
"default": undefined,

__tests__/reducers/auth.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const photoURL = 'http://url';
88
const mockActions = {
99
auth: {
1010
loadProfile: mockAction('LOAD_PROFILE', Promise.resolve('Profile')),
11+
getMemberGroups: mockAction('GET_MEMBER_GROUPS', Promise.resolve(['Group'])),
1112
setTcTokenV2: mockAction('SET_TC_TOKEN_V2', 'Token V2'),
1213
setTcTokenV3: mockAction('SET_TC_TOKEN_V3', 'Token V3'),
1314
},
@@ -107,6 +108,7 @@ describe('Default reducer', () => {
107108
reducer = reducers.default;
108109
testReducer({
109110
authenticating: true,
111+
memberGroups: [],
110112
profile: null,
111113
tokenV2: '',
112114
tokenV3: '',
@@ -124,6 +126,7 @@ describe('Factory without server side rendering', () => {
124126

125127
testReducer({
126128
authenticating: true,
129+
memberGroups: [],
127130
profile: null,
128131
tokenV2: '',
129132
tokenV3: '',
@@ -145,6 +148,6 @@ describe('Factory with server side rendering', () => {
145148
});
146149

147150
testReducer({
148-
authenticating: false, user: 'User object', profile: 'Profile', tokenV2: 'Token V2', tokenV3: 'Token V3',
151+
authenticating: false, user: 'User object', profile: 'Profile', tokenV2: 'Token V2', tokenV3: 'Token V3', memberGroups: ['Group'],
149152
});
150153
});

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