File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,29 @@ angular.module('topcoderX')
271
271
}
272
272
273
273
var currentUser = jwtHelper . decodeToken ( tctV3 ) ;
274
+
275
+ Object . keys ( currentUser ) . findIndex ( function ( key ) {
276
+ if ( key . includes ( 'roles' ) ) {
277
+ currentUser . roles = currentUser [ key ] ;
278
+ return true ;
279
+ }
280
+ return false ;
281
+ } ) ;
282
+ Object . keys ( currentUser ) . findIndex ( function ( key ) {
283
+ if ( key . includes ( 'handle' ) ) {
284
+ currentUser . handle = currentUser [ key ] ;
285
+ return true ;
286
+ }
287
+ return false ;
288
+ } ) ;
289
+ Object . keys ( currentUser ) . findIndex ( function ( key ) {
290
+ if ( key . includes ( 'userId' ) ) {
291
+ currentUser . userId = parseInt ( currentUser [ key ] , 10 ) ;
292
+ return true ;
293
+ }
294
+ return false ;
295
+ } ) ;
296
+
274
297
currentUser . id = currentUser . userId ;
275
298
currentUser . token = tctV3 ;
276
299
You can’t perform that action at this time.
0 commit comments