@@ -28,7 +28,8 @@ import {
2828
2929@injectable ( { scope : BindingScope . TRANSIENT } )
3030export class ImportArchivedDataService {
31- repo : AnyObject ;
31+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
32+ repo : any ;
3233 constructor (
3334 @repository ( JobDetailsRepository )
3435 public jobDetailsRepo : JobDetailsRepository ,
@@ -59,7 +60,6 @@ export class ImportArchivedDataService {
5960 const jobDetails = await this . jobDetailsRepo . findById ( jobId ) ;
6061 const modelName = jobDetails . entity ;
6162 const filter = jobDetails . filterInquired ;
62- const importData : AnyObject = { } ;
6363
6464 const archiveFilter : Filter < ArchiveMapping > =
6565 await this . buildWhereConditionService . buildConditionForFetch (
@@ -69,7 +69,7 @@ export class ImportArchivedDataService {
6969
7070 const archivedEntries = await this . archivalMappingRepo . find ( archiveFilter ) ;
7171
72- let data : AnyObject [ ] = [ ] ;
72+ const data : AnyObject [ ] = [ ] ;
7373
7474 for ( const entry of archivedEntries ) {
7575 const fileContent = await this . importArchiveData ( entry . key ) ;
@@ -105,26 +105,29 @@ export class ImportArchivedDataService {
105105 status : JobStatus . SUCCESS ,
106106 result : JSON . stringify ( allRecords ) ,
107107 } ) ;
108- this . processImportedData ( allRecords ) ;
108+ await this . processImportedData ( allRecords ) ;
109109 }
110110
111- async getFilteredData ( ) { }
112-
113111 // sonarignore:start
114112 private async getRepositoryByModelName < T extends Entity > (
115113 modelName : string ,
114+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
116115 ) : Promise < DefaultCrudRepository < T , any > | undefined > {
117116 // Find all bindings with keys matching 'repositories.*'
118117 const repositoryBindings =
118+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
119119 this . context . find < DefaultCrudRepository < any , any > > ( 'repositories.*' ) ;
120120
121121 // Iterate through the bindings to find the matching repository
122122 for ( const binding of repositoryBindings ) {
123- const repository = await this . context . get <
123+ const repoName = await this . context . get <
124+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
124125 DefaultCrudRepository < any , any >
126+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
125127 > ( binding . key as unknown as BindingKey < DefaultCrudRepository < any , any > > ) ;
126- if ( repository . entityClass . name === modelName ) {
127- return repository as DefaultCrudRepository < T , any > ;
128+ if ( repoName . entityClass . name === modelName ) {
129+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
130+ return repoName as DefaultCrudRepository < T , any > ;
128131 }
129132 }
130133 // sonarignore:end
0 commit comments