@@ -39,7 +39,8 @@ export const customConnectionRepositoryExtension: IConnectionRepository &
3939 . leftJoinAndSelect ( 'connection.groups' , 'group' )
4040 . leftJoinAndSelect ( 'group.users' , 'user' )
4141 . leftJoinAndSelect ( 'connection.connection_properties' , 'connection_properties' )
42- . andWhere ( 'user.id = :userId' , { userId : userId } ) ;
42+ . andWhere ( 'user.id = :userId' , { userId : userId } )
43+ . orderBy ( 'connection.createdAt' , 'DESC' ) ;
4344 if ( ! includeTestConnections ) {
4445 connectionQb . andWhere ( 'connection.isTestConnection = :isTest' , { isTest : false } ) ;
4546 }
@@ -54,7 +55,8 @@ export const customConnectionRepositoryExtension: IConnectionRepository &
5455 . leftJoinAndSelect ( 'group.users' , 'user' )
5556 . leftJoinAndSelect ( 'connection.connection_properties' , 'connection_properties' )
5657 . andWhere ( 'user.id = :userId' , { userId : userId } )
57- . andWhere ( 'connection.isTestConnection = :isTest' , { isTest : true } ) ;
58+ . andWhere ( 'connection.isTestConnection = :isTest' , { isTest : true } )
59+ . orderBy ( 'connection.createdAt' , 'DESC' ) ;
5860 const connections = await connectionQb . getMany ( ) ;
5961 await decryptConnectionsCredentialsAsync ( connections ) ;
6062 return connections ;
0 commit comments