@@ -28,7 +28,8 @@ import {
28
28
29
29
@injectable ( { scope : BindingScope . TRANSIENT } )
30
30
export class ImportArchivedDataService {
31
- repo : AnyObject ;
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
+ repo : any ;
32
33
constructor (
33
34
@repository ( JobDetailsRepository )
34
35
public jobDetailsRepo : JobDetailsRepository ,
@@ -59,7 +60,6 @@ export class ImportArchivedDataService {
59
60
const jobDetails = await this . jobDetailsRepo . findById ( jobId ) ;
60
61
const modelName = jobDetails . entity ;
61
62
const filter = jobDetails . filterInquired ;
62
- const importData : AnyObject = { } ;
63
63
64
64
const archiveFilter : Filter < ArchiveMapping > =
65
65
await this . buildWhereConditionService . buildConditionForFetch (
@@ -69,7 +69,7 @@ export class ImportArchivedDataService {
69
69
70
70
const archivedEntries = await this . archivalMappingRepo . find ( archiveFilter ) ;
71
71
72
- let data : AnyObject [ ] = [ ] ;
72
+ const data : AnyObject [ ] = [ ] ;
73
73
74
74
for ( const entry of archivedEntries ) {
75
75
const fileContent = await this . importArchiveData ( entry . key ) ;
@@ -105,26 +105,29 @@ export class ImportArchivedDataService {
105
105
status : JobStatus . SUCCESS ,
106
106
result : JSON . stringify ( allRecords ) ,
107
107
} ) ;
108
- this . processImportedData ( allRecords ) ;
108
+ await this . processImportedData ( allRecords ) ;
109
109
}
110
110
111
- async getFilteredData ( ) { }
112
-
113
111
// sonarignore:start
114
112
private async getRepositoryByModelName < T extends Entity > (
115
113
modelName : string ,
114
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
115
) : Promise < DefaultCrudRepository < T , any > | undefined > {
117
116
// Find all bindings with keys matching 'repositories.*'
118
117
const repositoryBindings =
118
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
119
119
this . context . find < DefaultCrudRepository < any , any > > ( 'repositories.*' ) ;
120
120
121
121
// Iterate through the bindings to find the matching repository
122
122
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
124
125
DefaultCrudRepository < any , any >
126
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
125
127
> ( 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 > ;
128
131
}
129
132
}
130
133
// sonarignore:end
0 commit comments