mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-09 04:47:41 +00:00
expand config
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user