File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,13 @@ export default class ApiClient implements HttpClient {
136136 if ( resJson ) {
137137 const parsedRes = JSON . parse ( resJson ) ;
138138 if ( warrantToken != null ) {
139- parsedRes . warrantToken = warrantToken ;
139+ if ( Array . isArray ( parsedRes ) ) {
140+ for ( const res of parsedRes ) {
141+ res . warrantToken = warrantToken ;
142+ }
143+ } else {
144+ parsedRes . warrantToken = warrantToken ;
145+ }
140146 }
141147
142148 return parsedRes ;
Original file line number Diff line number Diff line change @@ -737,6 +737,8 @@ describe.skip('Live Test', function () {
737737
738738 warrantToken = await this . warrant . User . delete ( user1 . userId ) ;
739739 assert ( warrantToken ) ;
740+ warrantToken = await this . warrant . User . delete ( user2 . userId ) ;
741+ assert ( warrantToken ) ;
740742 warrantToken = await this . warrant . Permission . delete ( newPermission . permissionId ) ;
741743 assert ( warrantToken ) ;
742744 } ) ;
@@ -777,6 +779,9 @@ describe.skip('Live Test', function () {
777779 }
778780 ] ) ;
779781 assert . strictEqual ( warrants . length , 2 ) ;
782+ for ( const warrant of warrants ) {
783+ assert ( warrant . warrantToken ) ;
784+ }
780785
781786 userHasPermission1 = await this . warrant . Authorization . check ( {
782787 object : permission1 ,
You can’t perform that action at this time.
0 commit comments