expand config

This commit is contained in:
jurgis
2022-12-11 13:17:10 +02:00
parent 80ba785798
commit 0b438fb134
10 changed files with 72 additions and 36 deletions
@@ -6,7 +6,7 @@ import { SearchResponseDto } from '../Dto/search-response.dto';
import { SearchResponseItemDto } from '../Dto/search-response-item.dto';
import { InjectRepository } from '@nestjs/typeorm';
import { LrtCategory } from '../Entity/lrt-category.entity';
import { FindOptionsUtils, Repository } from 'typeorm';
import { Repository } from 'typeorm';
@Injectable()
export class LrtApiSearchClient {
+1 -1
View File
@@ -9,7 +9,7 @@ export class LrtService {
constructor(
private readonly kodiApiResponseFactory: KodiApiResponseFactory,
private readonly lrtApiClient: LrtApiClient,
private readonly recentSearchesService: RecentSearchesService
private readonly recentSearchesService: RecentSearchesService,
) {}
getMainMenu(): ApiResponse {
@@ -8,9 +8,7 @@ import { readFile, writeFile } from 'fs/promises';
@Injectable()
export class RecentSearchesService {
private readonly configService: ConfigService;
constructor(
private readonly kodiApiResponseFactory: KodiApiResponseFactory,
) {
constructor(private readonly kodiApiResponseFactory: KodiApiResponseFactory) {
this.configService = configService;
}
async getRecentSearches(module: string, path: string): Promise<ApiResponse> {
@@ -48,6 +46,9 @@ export class RecentSearchesService {
}
private getFilePath(module: string): string {
return join(this.configService.getRecentSearchesFolder(), module + '.json');
return join(
this.configService.getPaths().getRecentSearchesFolder(),
module + '.json',
);
}
}