File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ module.exports = {
23
23
AUTH0_PROXY_SERVER_URL : process . env . AUTH0_PROXY_SERVER_URL ,
24
24
25
25
TERMS_API_URL : process . env . TERMS_API_URL || 'https://api.topcoder-dev.com/v5/terms' ,
26
- MEMBER_API_URL : process . env . MEMBER_API_URL || 'https://api.topcoder-dev.com/v3 /members' ,
26
+ MEMBER_API_URL : process . env . MEMBER_API_URL || 'https://api.topcoder-dev.com/v5 /members' ,
27
27
USER_API_URL : process . env . USER_API_URL || 'https://api.topcoder-dev.com/v3/users' ,
28
28
CHALLENGE_API_URL : process . env . CHALLENGE_API_URL || 'http://localhost:4000/v5/challenges' ,
29
29
CHALLENGE_PHASES_API_URL : process . env . CHALLENGE_PHASES_API_URL || 'https://api.topcoder-dev.com/v5/challenge-phases' ,
Original file line number Diff line number Diff line change @@ -177,13 +177,13 @@ async function getMemberIdByHandle (handle) {
177
177
async function getMemberIdByHandleFromV3Members ( handle ) {
178
178
let memberId
179
179
try {
180
- logger . warn ( `getMemberIdByHandle ${ handle } from v3 ` )
180
+ logger . warn ( `getMemberIdByHandle ${ handle } from v5 ` )
181
181
const res = await getRequest ( `${ config . MEMBER_API_URL } /${ handle } ` )
182
- if ( _ . get ( res , 'body.result.content. userId' ) ) {
183
- memberId = String ( res . body . result . content . userId )
182
+ if ( _ . get ( res , 'body.userId' ) ) {
183
+ memberId = String ( res . body . userId )
184
184
}
185
185
// handle return from v3 API, handle and memberHandle are the same under case-insensitive condition
186
- handle = _ . get ( res , 'body.result.content. handle' )
186
+ handle = _ . get ( res , 'body.handle' )
187
187
} catch ( error ) {
188
188
// re-throw all error except 404 Not-Founded, BadRequestError should be thrown if 404 occurs
189
189
if ( error . status !== 404 ) {
You can’t perform that action at this time.
0 commit comments